Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance file handling #581

Merged
merged 19 commits into from
Jan 27, 2024
Merged

Conversation

probonopd
Copy link
Owner

@probonopd probonopd commented Dec 5, 2023

Build for testing.

For details please see #580.

Not ready for merging yet, this PR only exists so that we have builds for testing.

…digit number in the filename indicate a performance "voice number" in MiniDexed. The external filename numbers will now match any Program Change messages using the common MIDI concept of user selecting 1..128 whilst internally they are treated as 0..127. Note: in the case of performances, performance 1 (index 0) is the Default "performance.ini" file for backwards compatibility.

Also note that in this version, new performances, when saved, cannot occupy free slots between other performances - they are added to the end.

Even though the filename standard gives 6 digit numbers, the actual number of performances is still limited to 256.
@probonopd probonopd marked this pull request as draft December 5, 2023 17:46
@probonopd
Copy link
Owner Author

Build for testing:
MiniDexed_2023-12-05-e5b2656

@Banana71
Copy link

Banana71 commented Dec 5, 2023

The version from December 5th. works on my RPi4.
What has changed?
I noticed that when scrolling through the performances you can now go in circles (from the last to the first in just one step forward, or the other way around).

@probonopd
Copy link
Owner Author

@Banana71 please see #580 for details. This is the beginning of @diyelectromusic's plan to implement switching between folders = banks of performances. That part is not implemented yet, however.

@diyelectromusic
Copy link
Collaborator

What has changed?

The key change in this first version is to align the performance filename numbers with the performance numbers themselves, so that if there is a gap, the numbers still correspond to the right performances.

So

000002_Perf2
000003_Perf3
000005_Perf5
000008_Perf8

Will be selectable using MIDI PC voice instruments 2,3,5,8 (which "on the wire" is 1,2,4,7). Previously, they were loaded and sorted in numerical order, but without leaving gaps, so the above would have been 2,3,4,5 - meaning any gaps in numbering would get "out of sync" with the filenames.

I considered sorting this out a pretty extensive change in terms of changing how performance files work (see the files changed), but need this done to be able to do the rest. I wanted to know this was done and working ok before changing anything else.

(There is more on the problem here: https://diyelectromusic.wordpress.com/2023/11/22/a-dx7-usb-dongle/)

Kevin

@diyelectromusic
Copy link
Collaborator

Build for testing: MiniDexed_2023-12-09-a79acdf

There's nothing really to be testing yet, I'm just snapshotting a useful point for me to ensure everything is backed up online as things progress. I'll keep tinkering on and off over the next week or so and shout when there is something worth looking at :)

Kevin

@Banana71
Copy link

Banana71 commented Dec 9, 2023

Okay, good to know.

@diyelectromusic
Copy link
Collaborator

Latest "in development" build (for testing, not for using) now does the following:

  • Needs PCCH set for this to work either via menus or by setting PerformanceSelectChannel to a valid MIDI channel (1-16).
  • Subdirectories of performance directory with name in the format 01_Name will be turned into performance banks taking the user-facing number from the two digits (in decimal).
  • Up to 64 banks are supported.
  • Banks can be selected via MIDI only at this point. Note the MIDI "on the wire" bank number is User Bank Number - 1 (as is typical for MIDI voices and banks).
  • Bank 01 is reserved for the legacy performance directory itself, so additional banks should start from 02_....
  • Bank 01/Performance 00001 is still reserved for the legacy performance.ini in the root.

Limitations:

  • No UI handling of performance banks yet.
  • If a performance is saved, then it can only add them on the end of the performance list, not in any empty slots.
  • Very verbose on startup so that I can see what is loaded and when, so will scroll off the screen pretty quickly if you have lots of performances!

Changes in behaviour compared to existing releases:

  • If the performance directory doesn't already exist, it no-longer creates it.
  • Recall that my previous version made the numbers in performance names significant, so performance 00005_PerformanceName will be stored in "slot 5" (1-indexed) which can be selected by MIDI PC number 4 (0-indexed).

What needs testing if anyone fancies helping....

Check file/directory handling:

  • Check range of filenames in both main performance directory and subdirectories.
  • Check range of directory names.
  • Check handling of duplicates.
  • Check up to the limits as much as possible - note that in theory it supports up to 256 performances in each of up to 64 banks.
  • Check gaps in numbering, subdirectories in subdirectories, and so on...

Check MIDI handling when PCCH=0:

  • Check original voice/bank handling still works ok via UI.
  • Check original voice/bank handling still works ok via MIDI.
  • Check performance selection still works ok in UI.

Check MIDI handling when PCCH = valid MIDI channel:

  • Check performance selection still works ok via MIDI.
  • Change banks and recheck performance selection via MIDI.
  • Keep changing banks/performances include changing back to those already selected.
  • Check default bank/performance selection - bank 01/voice 01 should be the original performance.ini in the root.

General performance file handling:

  • Check saving as new file and verifying saving has worked and is preserved on power up.
  • Check saving overwriting and verifying saving has worked and is preserved on power up.
  • Check deleting and verifying it has worked and is preserved on power up.
  • Save multiple files before power cycling then verify all is good.
  • Delete multiple files before power cycling then verify all is good.
  • Do both saves and deletes before power cycling then verify all is good.
  • Save a file and delete it before power cycling.

General MiniDexed use to see how it fares.

I think this is largely doing what I'm expecting but it would be good to get some proper verification going on before moving on to the last main phase - the UI stuff.

Report any errors, ideally letting me know what test you're doing, any relevant context (filenames, structure, MIDI msgs, screen output, etc) and what happened! Especially any assets going off!

Thanks,
Kevin

@probonopd
Copy link
Owner Author

Build for testing:
MiniDexed_2023-12-16-3b2ae95

For the sake of consistency and simplicity we should probably drop the legacy stuff?

@diyelectromusic
Copy link
Collaborator

For the sake of consistency and simplicity we should probably drop the legacy stuff?

I almost proposed that, but I don't think we need to and it does allow someone to run it with a fairly minimal configuration.

Kevin

@Banana71
Copy link

Thank you @diyelectromusic Kevin for your hard work.

I tested with my RPi4, SSD1306, GY-PCM5102, classic MIDI input.

General performance file handling:

  • Check saving as new file and verifying saving has worked and is preserved on power up.
  • Check saving overwriting and verifying saving has worked and is preserved on power up.
  • Check deleting and verifying it has worked and is preserved on power up.
  • Save multiple files before power cycling then verify all is good.
  • Delete multiple files before power cycling then verify all is good.
  • Do both saves and deletes before power cycling then verify all is good.
  • Save a file and delete it before power cycling.

Check MIDI handling when PCCH=0:

  • Check original voice/bank handling still works ok via UI.
  • Check original voice/bank handling still works ok via MIDI.
  • Check performance selection still works ok in UI.

I use my Keystep37 to control MIDI CC 32 (LSB Controller) and MIDI CC 0 (Bank Select). I'm not sure if I'm doing something wrong, the program change doesn't work as expected

pCCH=1, MIDI CC 0=0: then I can choose between the standard performance bank and the sub performance folder 02_Name with MIDI CC 32 =0 or 1. I would have expected to choose the performance with MIDI CC 32 and not the bank.

Which MIDI CC commands do I have to use exactly to select the performances in miniDexed? Or what tools do you use to choose the bank and performance?

@Banana71
Copy link

With the Hydrasynth I can choose the banks and performances. Every now and then, graining occurs in the sound after a program change, but after switching back and forth several times, the graining disappears again.

@diyelectromusic
Copy link
Collaborator

diyelectromusic commented Dec 17, 2023

Banks are selected with a combination of the LSB and MSB for BankSelect, so MIDI CC 0 (MSB) and 32 (LSB). But as there are only 64 banks supported, actually we don't need to use the MSB, but I think the MIDI spec says to always send them. The performances within a bank are selected using Program Change messages.

If you use something like MidiOx then it will always send the combination of Bank MSB, Bank LSB, PC for any instrument selection, which again is what I think the MIDI spec suggests if using banks.

So the Banks will be numbered as follows:
MSB=0; LSB=0 - Bank 1 (the default performance set without any subdirectories) PC=0 to 127 for performances 001 (the default performance.ini); 002_Concert D; 003_The Grand; etc...
MSB=0; LSB=1 - Bank 2 - whatever is called 02_Some Performance Bank
... and so on down to ...
MSB=0; LSB=63 - Bank 64 - whatever is called 64_The Last Performance Bank

I think we can get away with only sending the LSB and PC though to actually change the bank, but I don't think this is technically valid within the spec! It also means it would apply whatever the last MSB sent was, so isn't recommended :)

MIDI Spec added below...

Kevin

image

image

@Banana71
Copy link

Banks are selected with a combination of the LSB and MSB for BankSelect, so MIDI CC 0 (LSB) and 32 (MSB).

I think you made a mistake there
https://anotherproducer.com/online-tools-for-musicians/midi-cc-list/
MIDI CC 0 (MSB)
MIDI CC 32 (LSB)

@diyelectromusic
Copy link
Collaborator

Banks are selected with a combination of the LSB and MSB for BankSelect, so MIDI CC 0 (LSB) and 32 (MSB).

I think you made a mistake there

Oops! Sorry, updated :)

Kevin

@diyelectromusic
Copy link
Collaborator

Latest update: Performance bank selection now included in the performance menu.

Notes:

  • I've tried to mirror the menu handling of selecting a performance - so it will respect the SelectPerformanceToLoad config setting, skip blank banks, wrap around, etc.
  • On changing banks it will select the first valid performance it finds in that bank.
  • No options to edit/save/delete/rename banks - it will only select.

So outstanding questions now:

  • Is it ok just to implement save for the end of banks or do I need to do something more complex there? Ideally it would find the first free slot, but in reality how many people are deleting performances for this to be an issue?
  • Also, is it ok to allow anyone to delete/change any performances in any banks - or should editing be limited to a specific "user" bank to allow the "presets" to always be available?
  • Is it ok to switch to the first valid performance in a bank when changing via the UI? If there are gaps, then I'm not sure what else we can realistically do. It isn't quite the same as voices - I know the current playing voice is left when changing banks (we had a big discussion about it somewhere, but I don't think we resolved what behaviour was "right" as different synths do different things).
  • Is 64 the right number of banks and 256 the right number of performances?

As before, this needs some proper testing (see my previous list of ideas, which really need repeating!). Also need to verify the operation of SelectPerformanceToLoad being 0 and 1 and make sure performance bank/voice loading from UI works as expected.

I still need to remove some debug strings, but they are quite useful atm for seeing what is going on, so they are still in for now.

Please let me know if you manage to give this a go. I'm not sure how much time I'll have over the next week now myself. Also if anyone feels like actually reviewing the code changes for any obvious things I've missed that would be cool too :)

I'm currently expecting a final update (to tidy up/remove debug strings/etc) after Christmas probably now.

Kevin

@probonopd
Copy link
Owner Author

Hi Kevin, thanks for your work. Here are my 2 cents:

Is it ok just to implement save for the end of banks

Yes, I think that's ok. I don't assume that anyone will want to do more complicated "performance management" on the MiniDexed device itself.

Ideally it would find the first free slot

Something to consider for later in case it turns out to be a commonly requested feature.

Also, is it ok to allow anyone to delete/change any performances in any banks - or should editing be limited to a specific "user" bank to allow the "presets" to always be available?

Again, I'd say let's not worry about that unless it turns out to be a commonly requested feature. (We could always use e.g., a .factory suffix-suffix on all kinds of files and directories and prevent those from being deleted.)

Is it ok to switch to the first valid performance in a bank when changing via the UI?

Yes. The question is, when does the performance switching occur. As soon as you switch to another bank, or only once you select a performance in the bank? (Ideally the behavior between voices and performances could be made consistent in this regard. What do real instruments do?)

Is 64 the right number of banks and 256 the right number of performances?

If you ask me, "unlimited" is the correct number of banks. (Not all of those will be addressable over MIDI, though.)

@diyelectromusic
Copy link
Collaborator

What do real instruments do?)

As I say, I think we ended up being inconclusive (more here: #425). But where we differ is that we might have a gap where an instrument is in another bank, so what happens then? Anyway, for now it switches to the first performance in the bank on bank select. People can try it and see how that feels.

I tend to like the behaviour that changing banks changes to the same selected voice in the new bank. But I think that comes from a keyboard (I forget which) where the same patch numbers across different banks have variations of a similar voice...

If you ask me, "unlimited" is the correct number of banks. (Not all of those will be addressable over MIDI, though.)

Well as we're not really using any kind of dynamic memory management in MiniDexed all structures are pre-allocated, so we do need to pick a size and go with it :)

@probonopd
Copy link
Owner Author

Well as we're not really using any kind of dynamic memory management in MiniDexed all structures are pre-allocated, so we do need to pick a size and go with it :)

That's concerning me. Which memory structure are we talking about? Can't we read the filesystem as-needed?

@diyelectromusic
Copy link
Collaborator

That's concerning me. Which memory structure are we talking about? Can't we read the filesystem as-needed?

Why? Pretty much every structure in MiniDexed is pre-allocated - that's why we set number of voices, number of banks, number of tone generators... if we have several of something, the number we handle is in a header file somewhere.

There are some cases where the object oriented nature of C++ is used for more dynamic creation of objects, but generally speaking this mostly happens on startup from what I've seen.

Kevin

@probonopd
Copy link
Owner Author

My comment is not specifically about this PR but is about how we handle files and directories in general. Whenever it comes to interacting with the filesystem, I think we should not hardcode things like the maximum number of files in a directory. Also, I think we should load files just-in-time when we need it (no sooner). If we did this, then the number of files on the SD card should not influence the boot time in any significant way. Does this make sense? (Again, not specific to this PR.)

@diyelectromusic
Copy link
Collaborator

diyelectromusic commented Dec 20, 2023

My comment is not specifically about this PR but is about how we handle files and directories in general. Whenever it comes to interacting with the filesystem, I think we should not hardcode things like the maximum number of files in a directory. Also, I think we should load files just-in-time when we need it (no sooner). If we did this, then the number of files on the SD card should not influence the boot time in any significant way. Does this make sense? (Again, not specific to this PR.)

That's easy to say if we were running with a proper, full operating system, but with an embedded 'bare metal' OS, we have to think about such things a lot more up front. That's just embedded systems.

In practical terms, we already know that having too many files in a directory causes everything to go really slowly due to the nature of FAT support in circle. But ultimately whilst there are no limits to the numbers of files and directories on the filesystem, by the nature of the system we only pay attention to a fixed number of them.

And yes, "load at point of use" is pretty good when you can do it, but it is quite complicated to do. And I do that (pretty much) for the performance banks anyway (a lot more so that we do with voices), but we still need some kind of "up front" knowledge about how many banks we know about so that we don't drag the performance of the UI to a halt - we don't want it parsing the filesystem for every click of the encoder... really, we don't :)

Ultimately, we need to remember what MiniDexed was for - an optimal, 'bare metal', embedded, performant system. If someone wants an open-ended, "all we can throw at a Raspberry Pi with large SD cards and lots of memory" type setup, then they are better off with a Zynthian or Dexed on Raspbian or something in my view.

Kevin

@probonopd
Copy link
Owner Author

Possibly :)

@Banana71
Copy link

So outstanding questions now:

Without reading the other answers first, I'll give you my unbiased opinion.

  • Is it ok just to implement save for the end of banks or do I need to do something more complex there? Ideally it would find the first free slot, but in reality how many people are deleting performances for this to be an issue?

It's okay, but the optimal solution would be to freely choose the storage space. You could choose a free storage space or overwrite an existing performance. The cherry on the cake would be if you could also change banks when saving. This way you could easily create your own favorites bank directly on the device.

  • Also, is it ok to allow anyone to delete/change any performances in any banks - or should editing be limited to a specific "user" bank to allow the "presets" to always be available?

Yes, everyone should be able to do everything. The best solution might be to be able to set write protection on a folder (bank) yourself.

  • Is it ok to switch to the first valid performance in a bank when changing via the UI? If there are gaps, then I'm not sure what else we can realistically do. It isn't quite the same as voices - I know the current playing voice is left when changing banks (we had a big discussion about it somewhere, but I don't think we resolved what behaviour was "right" as different synths do different things).

Absolutely yes. And it's also ok that the last performance remains active.

  • Is 64 the right number of banks and 256 the right number of performances?

I think 128 performances per bank makes sense. Anything beyond that cannot be accessed via Midi Program Change. If you want to quickly scroll between performances using the encoder, you probably won't want to have more than 64 performances in a bank. A limit of 256 performances is okay, but I wouldn't use it myself.
What are the loading times when changing banks? Are all performances then loaded to implement the sorting?
Does the number of banks influence the boot time or when changing banks?
128 banks with a maximum of 128 performance are the MIDI limits.

I think you all know that I really like the miniDexed and I can work well with it as it is. Any improvement you make is fantastic. Thanks

@diyelectromusic
Copy link
Collaborator

diyelectromusic commented Dec 20, 2023

I think 128 performances per bank makes sense.

Actually, I probably agree with you. I'll probably change it to 128. We will need to renumber the default set though as some of those are currently numbered more than 128.

What are the loading times when changing banks? Are all performances then loaded to implement the sorting?

Pretty quick in tests, but I've not had many performances in each bank. I'm no longer sorting as the number is now significant, so the order is derived directly from the filenames in performances (and banks) and there might be gaps and that is fine.

Does the number of banks influence the boot time or when changing banks? 128 banks with a maximum of 128 performance are the MIDI limits.

I don't think so. I have to scan the bank names/numbers on power up, that is all. It only scans the directory itself when changing banks.

128 banks with a maximum of 128 performance are the MIDI limits.

With MSB/LSB the MIDI limit is actually 16384 possible banks.

I've not tested it to the full numbers yet. Also, it will be slower in this version as it is printing a lot of debug info out to the console.

Kevin

@probonopd
Copy link
Owner Author

probonopd commented Dec 20, 2023

With MSB/LSB the MIDI limit is actually 16384 possible banks.

Let's use that then 👍

@diyelectromusic
Copy link
Collaborator

Mastodon
Looks like I really need to find my password again ,-)

Or ping me an email at diyelectromusic at gmail :)

I'm good to go with this one and will just have to bug fix if more things turn up.

Kevin

@probonopd probonopd merged commit 4755c5d into probonopd:main Jan 27, 2024
1 check passed
@probonopd
Copy link
Owner Author

Merged. @diyelectromusic please feel free to edit the wiki accordingly.

You can reach me at probono at puredarwin dot org, but the quickest way is usually via GitHub. Thanks!

@diyelectromusic
Copy link
Collaborator

Phew! :)

Will do, re wiki, but it might have to wait another day or so!

Kevin

@diyelectromusic diyelectromusic deleted the PerformanceUpdates branch January 27, 2024 19:15
@diyelectromusic
Copy link
Collaborator

Some notes now added to the wiki, plus a bit of general tidying up of the performance section.

https://github.com/probonopd/MiniDexed/wiki/Files#performanceini

Kevin

@Lonolo
Copy link

Lonolo commented Jan 31, 2024

Wow - what a fantastic implementation!

Like clockwork! Using five Pi Zero2 modules MIDI-Thru-ed together.

Having the option to load the Performances from MIDI is awesome!

Much thanks for all the time put into organizing and building this!!!

@diyelectromusic
Copy link
Collaborator

Like clockwork! Using five Pi Zero2 modules MIDI-Thru-ed together.

Are these your eurorack modules? I bet they sound amazing!! :)

Kevin

@Lonolo
Copy link

Lonolo commented Feb 2, 2024

Thanks again for this! They really do sound incredible! It's been great to use full Performances on 4 tracks and still have 8 DX7's to spare.
dXeus-racked

Regarding the new 'Program Change action' in the minidexed.ini parameter, couldn't the Performance>PCCH parameter override these as:
Off= 0
1-16 = 1-16
OMNI = >16

I don't mean to add any "feature creep" to this implementation, but having multiple minidexed modules, I'd have to pull each card and change that parameter every time I need to change the MIDI channel for choosing performances on that channel. That module then becomes dedicated until I pull the card and reset that minidiexed.ini prog-change-action.

# Program Change action:
#   0 = Program Change messages select voices on the channel associated with each TG.
#   1-16 = Program Change messages on this channel select performances.
#   >16 = Program Change messages on ANY channel select performances.
# NB: In performance mode, all Program Change messages on other channels are ignored.
PerformanceSelectChannel=4

I realize this is a specific user-case, but still wondering why the minidexed.ini parameters are necessary since the PCCH options are in the Menu. Would this work with other use cases or am I completely off base?

@diyelectromusic
Copy link
Collaborator

Regarding the new 'Program Change action' in the minidexed.ini parameter, couldn't the Performance>PCCH parameter override these as: Off= 0 1-16 = 1-16 OMNI = >16

It should do, although it isn't permanent - is that what you mean? Basically on boot, the PCCH minidexed.ini value should set the default, but if you change PCCH via the menu then that should take effect instead until next power off/on...

Are you asking for a means of allowing the menu PCCH to be saved back to minidexed.ini? We don't have any settings that are saved back like that atm apart from the contents of the performance.ini itself.

I keep thinking we ought to have some kind of system.ini, but we don't yet.

Kevin

@Lonolo
Copy link

Lonolo commented Feb 2, 2024

OK, I thought it was as you say, Including not being permanant - I get that too.

Then is it possible that these Performance change parameters are Not being sent to MIDI thru (MIDI thru is pre-Performance-change code)?

Here's what happens:
These modules are set up PCCH 1-5 from left to right. As I change the MIDI Channel and program on the MPC, the modules connected downstream of this MIDI thru chain get changed too:

IMG_2948-480.mov

@diyelectromusic
Copy link
Collaborator

System level MIDI messages should be passed on via THRU, so that shouldn't be an issue.

I'm not entirely sure, if I'm honest, what you're describing...

But do you have an overlap between PCCH MIDI channels and channels in the performances? Could that be an issue? Try PCCH channels 2-6 maybe and leave channel 1 for playing?

@Banana71 are all the default performances configuring all TGs for channel 1?

As I change the MIDI Channel and program on the MPC, the modules connected downstream of this MIDI thru chain get changed too:

I don't quite follow what you mean here - when you say change MIDI channel on the MPC do you mean changing what channel it is transmitting? When you say "downstream get changed too" - what their MIDI channels? I don't think that is possible via MIDI...?

Kevin

@Lonolo
Copy link

Lonolo commented Feb 2, 2024

What I'm trying to do is have the MPC sequencer load Performances for each MIDI-track.

I have five tracks of MIDI transmitting respectively on MIDI channels 1-5 from the MPC to Module 1 on the left, the other modules are chained from the previous modules' thru.

The PCCH channels are set 1-5 from left to right. In the video I'm transmitting from the MPC, changing the channel, then the program change parameter.

I'm not comprehending when transmitting a prog change on let's say channel 3, that modules 4 & 5 change TG voices when their PCCH's are set 1-5 respectively & modules 1 & 2 don't change, only module 3 should change.

@diyelectromusic
Copy link
Collaborator

I'm not comprehending when transmitting a prog change on let's say channel 3, that modules 4 & 5 change TG voices when their PCCH's are set 1-5 respectively & modules 1 & 2 don't change, only module 3 should change.

Ha! At the moment - you and me both!! :)

I've been reading through the code again and can't see a way that will do that atm... you might need to enable the MIDI debug log on say 4 and 5 (to keep it simple) and show me what is being received by each module (sorry, it will go to the display, so I know that will be a bit of a pain!) - but that might give a clue!

I'll try to cobble together some boards here and give it a go.

What are the MIDI channels of the performances you're using - just the defaults? I think they're all set for channel 1... or have you changed the channels in the performances on 2-5 too?

Kevin

@Lonolo
Copy link

Lonolo commented Feb 2, 2024

I didn't change MIDI channels in any of the Performances, so all the modules should have Performances at their defaults which is typically channel 1 (unless it's a split type of performance ie 1 & 2).

I'll do a screenshot of the MIDI debug log - I'm curious what module 1 will say compared to 5...

...gotta go dig for a second mini-HDMI cable first!

@diyelectromusic
Copy link
Collaborator

diyelectromusic commented Feb 2, 2024

Ok - so this is what might be happening.

When a performance is selected, it does a sequence of internal "program changes" for each TG, but if the setting: MIDIAutoVoiceDumpOnPC is set to 1, which is the default, then there is a SysEx voice dump sent out to any active MIDI interfaces...

... so as all TGs are listening on MIDI 1, this gets sent out on MIDI channel 1 and received by any active TG.

So I don't think it is passing the performance selection via the THRU but the TG SysEx on MIDI channel 1 is being passed to all TGs.

So the performance isn't being changed, but the "live" DX voice is being set, via SysEx, to whatever voice is chosen as part of the selected performance... This is why you see several voice names flashing past - it is sequencing through all the voices used in the performance - now all sent as SysEx on channel 1! You might notice if you then try to change the voice using the UI that the voice name isn't correct for the voice number (just turn once left then right again to reselect the same number - the name will be different!).

Hopefully, setting MIDIAutoVoiceDumpOnPC=0 will solve it.

Aside: this will also happen when selecting a performance via the menu too... sigh...

I don't like this feature tbh - and think we should default to off, but it is legacy behaviour that someone coded in at one time and I'm reluctant to change the default atm...

But this seems like a strong reason to change it! :)

Kevin.

@Lonolo
Copy link

Lonolo commented Feb 2, 2024

BINGO!!!!

Works as expected now!

Stupid boolean, ate my entire day.

This makes all your combined efforts on this Performance-use implementation worthwhile!

Thanks again for your time on this and agree it would make a great change.

Check out this dump before the change, on a sixth module I added:

IMG_2950

That was from turning the encoder one click on the first module's TG voice change!

@Banana71
Copy link

Banana71 commented Feb 2, 2024

Great that it works for you @Lonolo now. 👍

MIDIAutoVoiceDumpOnPC=0 Basically, the first thing I do is set the parameter like this when I configure a new version of minidexed.

Anyone who works with more than one miniDexed at the same time or who wants to work with a MIDI channel other than 1 has the problem that the MIDI channel in the "default Performances" is set to "1" for the active TGs.

I haven't come up with a really good solution yet.

@diyelectromusic
Copy link
Collaborator

That was from turning the encoder one click on the first module's TG voice change!

There is definitely something odd going on there - F7 should be a valid end of SysEx marker - looks like its missed the F0 start marker - maybe it got spammed part way through another MIDI message and screwed up the parsing...

Anyway - from both these comments that settles it - that should be off by default :)

Kevin

@Banana71
Copy link

Banana71 commented Feb 2, 2024

A solution for multiple miniDexed:

#
# performance.ini
#

# TG#
#BankNumber#=0		# 0 .. 127
#VoiceNumber#=1		# 1 .. 32
#MIDIChannel#=1		# 1 .. 16, 0: off, 17: Midi Channel is adopted by PCCH ;  >17: omni mode

If the Midi channel in the performance is set to 17, the Midi channel is adopted with the value of PCCH.
The PCCH would therefore also be a kind of local MIDI channel

So I could set the MIDI channel to 17 in all default performances. The performances would then also be compatible with older systems.
If the PCCH is set to "off" you could leave the value at 17, which would again be OMNI. Difficult to explain.

@Lonolo
Copy link

Lonolo commented Feb 3, 2024

Thanks @Banana71 that makes sense,

So I'll write a script to modify all my Performance files changing MIDIChannel#=1 to MIDIChannel#=17, that would be ideal for a rack of MIDI selectable and controlled Performances played back.

@Banana71
Copy link

Banana71 commented Feb 3, 2024

Unfortunately I have no idea about C++
I'll try to describe in my own words (Basic) what function the code should have:

performanceconfig.cpp

                      READ PCCH: READ MIDIChannel# : IF PCCH=0 THEN GOTO  Assign MIDI channel  (ROW 111)
                      IF MIDIChannel#=17 THEN MIDIChannel#=PCCH ELSE GOTO  Assign MIDI channel (ROW 111)

111                Assign MIDI channel
112                PropertyName.Format ("MIDIChannel%u", nTG+1);
113                unsigned nMIDIChannel = m_Properties.GetNumber (PropertyName, 255);
114                if (nMIDIChannel == 0)
115                {
116                        m_nMIDIChannel[nTG] = CMIDIDevice::Disabled;
117                }
118                else if (nMIDIChannel <= CMIDIDevice::Channels)
119                {
120                        m_nMIDIChannel[nTG] = nMIDIChannel-1;
121                        bResult = true;
122                }
123                else
124                {
125                        m_nMIDIChannel[nTG] = CMIDIDevice::OmniMode;
126                        bResult = true;
127                }

I have no idea if this is the right place in the program but I hope you understand what I mean. 😅

@diyelectromusic
Copy link
Collaborator

So I'll write a script to modify all my Performance files changing MIDIChannel#=1 to MIDIChannel#=17, that would be ideal for a rack of MIDI selectable and controlled Performances played back.

I'm afraid this doesn't exist - this is a proposal by @Banana71

I need to think about it properly and see how it might interact with everything else! :)

Kevin

@Lonolo
Copy link

Lonolo commented Feb 3, 2024

Doh! I see.

Then I second the motion!

Let me know how I can help and or test.

@Banana71
Copy link

Banana71 commented Jan 12, 2025

I plan to use a Raspberry Pi Zero 2 with miniDexed as a drum, bass and FX player. 16 TGs would be ideal for this, but the polyphony could be low. Kevin @diyelectromusic, can you compile for testing a version in which I can freely set the parameters for the number of TGs and the polyphony? To save resources, the reverb could be deactivated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants