zynthian / zynthian-issue-tracking

Centralized Issue Tracking for Zynthian Project
https://github.com/orgs/zynthian/projects/1
11 stars 3 forks source link

Audio player speed change without pitch shift #929

Closed sstojos closed 8 months ago

sstojos commented 9 months ago

Current audio player only can change speed by changing a pitch. It would be great to be able to change speed but not a pitch.

zynthian can be used for practising where one layer can be audio player that plays backing track while another synth. It would be beneficial in this case to have a way for audio player to play backing track slower without a pitch change so that learning the part can first be done with a slower speed until it is mastered there before moving to right speed.

jofemodo commented 9 months ago

I would like to have full control of speed and pitch from Audio Player. Something like this:

Regarding Pitch Shifting:

Regarding Time Stretching:

Regards,

riban-bw commented 8 months ago

All implemented in oram branch. Now can:

sstojos commented 8 months ago

Great thanks @riban-bw ! I have just ordered another sd card to put your branch on to it for testing. Will let you know the results.

sstojos commented 8 months ago

Hi @riban-bw , I have updated to your branch all repositories but my zyntian is erroring on boot.

$ ssh -l root 192.168.1.220
root@192.168.1.220's password:

 ##########################       ----------------------------------------
#                          #      ZynthianOS: Built on os.zynthian.org
#            ##            #      Timestamp: 2023-08-25
#      ##   #  #   ##      #      Optimized: Raspberry Pi 3 Model B Plus
#     #  #  #  #  #  #     #      ----------------------------------------
###   #  #  #  #  #  #   ###      Kit:           Custom
#  #  #  #  #  #  #  #  #  #      Display:       MIPI DSI 800x480
#   ##   #  #  #  #   ##   #      Soundcard:     HifiBerry DAC+ light
#         ##    ##         #      Wiring Layout: DUMMIES
#                          #      ----------------------------------------
 ##########################
                                  zynthian-ui: oram (26370a)
                                  zynthian-webconf: oram (37d9e5)
                                  zyncoder: oram (9ea5d3)
                                  zynthian-sys: oram (5ea965)
                                  zynthian-data: oram (4555a9)
                                  ---------------------------------------

I have updated zynthian using CLI before switching to your branch. Should I start with flashing latest sdcard image and then switch to your branch ?

sstojos commented 8 months ago

Error is the following:

DEBUG:zynthian_lv2.load_engines: Loading engine config failed: Expecting ':' delimiter: line 1 column 8207 (char 8206)
Traceback (most recent call last):
  File "./zynthian_main.py", line 34, in <module>
    from zyngine.zynthian_chain import *
  File "/home/pi/zynthian-ui/zyngine/__init__.py", line 25, in <module>
    from zyngine.zynthian_lv2 import *
  File "/home/pi/zynthian-ui/zyngine/zynthian_lv2.py", line 684, in <module>
    load_engines()
  File "/home/pi/zynthian-ui/zyngine/zynthian_lv2.py", line 172, in load_engines
    if not os.path.exists(ENGINE_CONFIG_FILE) or "ID" not in engines['AE']:
KeyError: 'AE'
riban-bw commented 8 months ago

Try an update from webconf. The startup issue should be fixed.

sstojos commented 8 months ago

Update did now work either - now the erros is:

INFO:zynthian_engine_audioplayer.zynthian_engine_audioplayer: Supported Audio Codecs: ['aiff', 'aifc', 'au', 'caf', 'flac', 'mp3', 'vox', 'opus', 'ogg', 'wav']
DEBUG:zynthian_lv2.load_engines: Loading engine config failed: Expecting ':' delimiter: line 1 column 8207 (char 8206)
Traceback (most recent call last):
  File "./zynthian_main.py", line 36, in <module>
    from zyngui.zynthian_gui import zynthian_gui
  File "/home/pi/zynthian-ui/zyngui/zynthian_gui.py", line 47, in <module>
    from zyngine import zynthian_state_manager
  File "/home/pi/zynthian-ui/zyngine/zynthian_state_manager.py", line 49, in <module>
    from zyngine.zynthian_chain_manager import *
  File "/home/pi/zynthian-ui/zyngine/zynthian_chain_manager.py", line 1478, in <module>
    zynthian_chain_manager.get_engine_info()
  File "/home/pi/zynthian-ui/zyngine/zynthian_chain_manager.py", line 148, in get_engine_info
    cls.engine_info['PT']['TITLE'] = pt_info['name']
KeyError: 'PT'

I will wait for new stable release to test it

riban-bw commented 8 months ago

@jofemodo This is caused by this change which calls zynthian_chain_manager.get_engine_info() when chain_manager module is loaded but can cause key error on some systems.

riban-bw commented 8 months ago

@sstojos When did you move to chain_manager branch? It may be that you have an old, partially populated engine config file. This is dynamically created at runtime. If you have one built during eary development phase then it is likely to be corrupt or incomplete. Please try deleting /zynthian/config/engine_config.json and retesting.

During development phase there are changes to various bits of code, config, etc. that may need manual intervention to resolve. We aim to ensure migration between stable releases do not encounter these issues but not between commits within a development cycle. (To do so would add too much compatibility code.)