Skip to content

Getting Synth PCM Samples and more #395

Closed

Description

@inkapmb

I was trying to dump Synth PCM Samples from e2 synth with the dump_extracted_pcm.py script but I have some issues, in particular to open midi port with mido.open_input('electribe') saying OSError: unknown port 'electribe'. I patched it as

mido.open_input() port = mido.get_input_names()[0]

then I got new issue with the e2SysEx.read_cpu_ram() function, therefore I fill I might misunderstand the process to dump Synth PCM samples.

What I did is :

  1. turn on my e2 synth
  2. plug USB from e2 synth to my computer
  3. lsusb to ensure that e2 synth is detected by my computer
  4. then python scripts/dump_extracted_pcm.py

I hope @bangcorrupt you can detail the steps needed.

In addition, I wonder that if we can use e2SysEx.read_cpu_ram() to get Synth PCM Samples we should be able to get the other samples of the e2 synth ?

Thank you in advance for your attention to my questions!

Activity

  1. bangcorrupt commented on Nov 7, 2025

    @bangcorrupt
    Owner

    The steps you're taking look correct, there is likely an issue with the port name.

    mido.get_input_names()[0]

    What is the output of mido.get_input_names() and mido.get_ouput_names()?

    then I got new issue with the e2SysEx.read_cpu_ram()

    Can you describe the issue and post any logs you get from the script?

    get the other samples

    There are no other samples.

  2. bangcorrupt commented on Nov 7, 2025

    @bangcorrupt
    Owner

    You also need to make sure you have patched the firmware using the synth-pcm-dump branch.

  3. inkapmb commented on Nov 7, 2025

    @inkapmb
    Author

    Okay, so if I understand right :

    1. I have an original e2 synth
    2. I have to patch it with synth-hacked-SYSTEM.VSB
    3. then revers it in to synth version with synth-revert-SYSTEM.VSB
    4. then I will be able to dump Synth PCM Samples with python scripts/dump_extracted_pcm.py

    am I right ?

  4. inkapmb commented on Nov 7, 2025

    @inkapmb
    Author

    There are no other samples.

    In addition when I mean the other samples, I mean sample from 001 (SubBeef) to 325 (Oldie)

  5. bangcorrupt commented on Nov 7, 2025

    @bangcorrupt
    Owner

    No, you need to install synth-hacked-SYSTEM.VSB patched using the synth-pcm-dump branch I linked above.

    Then you will be able to dump synth PCM samples using scripts/dump_extracted_pcm.py.

    I mean sample from 001 (SubBeef) to 325 (Oldie)

    These will be included, it will dump all the samples as one file. It should take about a minute and will look like it is doing nothing.

    If you still have issues with the script, post the logs I asked for above.

  6. inkapmb commented on Nov 7, 2025

    @inkapmb
    Author

    Okay, so I did patch my e2 synth with synth-hacked-SYSTEM.VSB patched using the synth-pcm-dump branch you linked above, then I tried to dump with scripts/dump_extracted_pcm.py.

    It gaves me OSError: unknown port 'electribe2 sampler electribe2 s' as the first time.

    What is the output of mido.get_input_names() and mido.get_ouput_names()?

    >>> mido.get_input_names() 
    ['Midi Through:Midi Through Port-0 14:0']
    >>> mido.get_output_names()
    ['Midi Through:Midi Through Port-0 14:0']
    

    and lsusb gave me Bus 001 Device 007: ID 0944:012e KORG, Inc. electribe2 sampler

    Then I added port = mido.get_input_names()[0] before this line

    and it gave me :

    Traceback (most recent call last):
      File "./hacktribe-synth-pcm-dump/./scripts/dump_extracted_pcm.py", line 8, in <module>
        e = E2Sysex()
            ^^^^^^^^^
      File "./hacktribe-synth-pcm-dump/scripts/e2sysex.py", line 37, in __init__
        self.global_channel, self.id, self.version = self.search_device()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: cannot unpack non-iterable int object
    
    
  7. bangcorrupt commented on Nov 7, 2025

    @bangcorrupt
    Owner
    >>> mido.get_input_names() 
    ['Midi Through:Midi Through Port-0 14:0']
    >>> mido.get_output_names()
    ['Midi Through:Midi Through Port-0 14:0']
    

    This shows that mido can't see the electribe, it would be listed after 'Midi Through...'.

    What is the output of mido.backend?

    In a bash shell, what is the ouput of aconnect -l?

  8. inkapmb commented on Nov 7, 2025

    @inkapmb
    Author

    What is the output of mido.backend?

    gaves : <backend mido.backends.rtmidi (loaded)>

    In a bash shell, what is the ouput of aconnect -l?

    ~$ aconnect -l
    client 0: 'System' [type=noyau]
        0 'Timer           '
    	Connexion À: 144:0
        1 'Announce        '
    	Connexion À: 144:0
    client 14: 'Midi Through' [type=noyau]
        0 'Midi Through Port-0'
    client 144: 'PipeWire-System' [type=utilisateur,pid=3656]
        0 'input           '
    	Connecté Depuis: 0:1, 0:0
    client 145: 'PipeWire-RT-Event' [type=utilisateur,pid=3656]
        0 'input 
    
  9. bangcorrupt commented on Nov 7, 2025

    @bangcorrupt
    Owner
    ~$ aconnect -l
    client 0: 'System' [type=noyau]
        0 'Timer           '
    	Connexion À: 144:0
        1 'Announce        '
    	Connexion À: 144:0
    client 14: 'Midi Through' [type=noyau]
        0 'Midi Through Port-0'
    client 144: 'PipeWire-System' [type=utilisateur,pid=3656]
        0 'input           '
    	Connecté Depuis: 0:1, 0:0
    client 145: 'PipeWire-RT-Event' [type=utilisateur,pid=3656]
        0 'input 
    

    Linux can't see the electribe as a MIDI device, you need to fix that first.

  10. inkapmb commented on Nov 7, 2025

    @inkapmb
    Author

    Linux can't see the electribe as a MIDI device, you need to fix that first.

    I'm currently searching but I dont have any clue of why and how to do it for the moment...

  11. inkapmb commented on Nov 7, 2025

    @inkapmb
    Author

    Well, I guess it was just an ALSA bug that didn't recognize the device, but after a reboot, everything worked fine and it was recognized. Then I did pyhton3 scripts/dump_extracted_pcm.py and a few errors occurred, but I think it worked. Here is the output :

    python3 ./scripts/dump_extracted_pcm.py 
    DEBUG:root:Initialise SysEx
    INFO:root:Found electribe
    INFO:root:Global channel 0
    INFO:root:Firmware version 2.2
    DEBUG:root:Getting decompressed PCM from CPU RAM
    DEBUG:root:Called read_cpu_ram
    DEBUG:root:Sending message
    
    MidiInAlsa::alsaMidiHandler: unknown MIDI input error!
    System reports: Resource temporarily unavailable
    
    MidiInAlsa::alsaMidiHandler: unknown MIDI input error!
    System reports: Resource temporarily unavailable
    DEBUG:root:Received response
    DEBUG:root:Decoding binary
    DEBUG:root:Writing pcm-dump.wav
    
  12. bangcorrupt commented on Nov 7, 2025

    @bangcorrupt
    Owner

    That looks right, you should have pcm-dump.wav in the same directory.

    MidiInAlsa::alsaMidiHandler: unknown MIDI input error!
    System reports: Resource temporarily unavailable

    I get these errors too, I think it's just because it takes a long time.

  13. inkapmb commented on Nov 7, 2025

    @inkapmb
    Author

    I listenned to the wav created and at ~ 50 second it is totally noise, there is no wave form... do you have the same ?

    In addition, if I want hacktribe now that the sampler firmware is installed on my e2 synth (originally) did I need to use sampler-hacked-SYSTEM.VBS or synth-hacked-SYSTEM.VBS ?

  14. Repository owner locked and limited conversation to collaborators on Nov 8, 2025
  15. converted this issue into a discussion #396 on Nov 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions