Date   

Re: Dynamic Channel Names #UnO2

ossandust
 

The one thing which still amazes/frustrates me most with the FCB1010 : Behringer could very easily replace the current 2KB setup memory with a 32KB chip without changing anything in the design or production process - it's fully pin compatible, it would raise the product cost with an amazing 15 cents (memory would cost around 0.25USD instead of 0.1USD), but what a difference it would make in what you could achieve with that same hardware. It's a shame... 


Re: Dynamic Channel Names #UnO2

Jack Fenton
 

Don't get me wrong. I think Uno2 is amazing!  Just thinking of ways to improve it and make it even better knowing the limitations of the FCB1010 memory.

I assume the less code you have to write, the less memory will be consumed on the device. Maybe not always a good assumption as I'm not sure how the code uses memory. I'm still experimenting since I've only had Uno2 for a few weeks.



Re: Dynamic Channel Names #UnO2

ossandust
 

ok, that makes sense.


Re: Dynamic Channel Names #UnO2

Jack Fenton
 

    It is  requested primarily for code reuse. I  want to be able to use the same code preset to send to a different MIDI channel depending on the device I have selected.

Instead of

switch($device)
{
case "Hammond":
 SendMidi HAMMOND ProgChange 1
 break
case "Nord"
 SendMIDI NORD ProgChange 1
 break
default:
 break
}

I would like to do this:

SendMidi $Device ProgChange 1

You don't think this adds value?  No switch statements and just 1 line of code.


Re: Consumption of Memorory #UnO2

Jack Fenton
 

Thanks, I'll play around with it to see what I can do to reduce memory. I only have 3 banks but most of my presets/triggers look to see what device is selected before applying the correct MIDI output. So a lot of case statements and in some instances, nested case statements within my triggers and presets. I had to eliminate the banks MSB LSB CCs in order to make things fit.

Basically, I use a pedal to select which device I want to talk to, then use the same presets/triggers for both devices.  In some cases I assign pedal functions for each device with some of the pedals which is the nested case statements.



Re: Dynamic Channel Names #UnO2

ossandust
 

No, the CHANNEL statements are there just for 2 reasons : 
- they make your code much more readable, as you clearly see to which device you are sending each command
- they make it easy to change the MIDI channel to which a certain device listens, for instance when you add more gear to your setup : just change the MIDI channel value in the "CHANNEL" definition line, instead of modifying all commands throughout the setup
I don't see much practical use in a dynamic MIDI channel definition - a MIDI device normally listens to 1 (or multiple) configured channels, this normally doesn't change once configured.


Re: Consumption of Memorory #UnO2

ossandust
 

A compiled setup doesn't contain any strings, since the FCB1010 doesn't use the string values. During compilation all possible values of a string variable are listed and converted to a 10-bit index  (a string variable can contain up to 1024 possible values). So the length of the string is not relevant for the setup size. 
It's not easy to calculate which approach will take most memory, you'll just need to try it out. A trigger is a good way to group commands which are often reused, but if the trigger only contains 2 MIDI commands and you always have to combine the "SendTrigger" command with some extra variable initialization code, it will take more memory than simply specifying the SendMIDI commands in the presets.


Dynamic Channel Names #UnO2

Jack Fenton
 

I would like to be able to do this :

 
VAR $ham = "Hammond"
VAR $nord = "Nord"
 
CHANNEL $nord = 12 // would like $nord to expand to NORD
CHANNEL $ham = 1 // would like $ham to expand to Hammond


or this:

VAR $ham = 1
VAR $nord = 12
 
CHANNEL NORD = $nord
CHANNEL HAMMOND = $ham

It appears that the CHANNEL command has no support for variable names.





Re: While Statement issue with Uno2 #UnO2

ossandust
 
Edited

ok, I tried it out myself now and I can confirm these are 2 bugs : 
- arithmetic functions on variables should always keep the value between 0 and 127, also in case of "overflow"
- when using a "while" loop within a switch statement, the "case" condition is not correctly evaluated on statements following the while loop. 

Following version works correctly, because it doesn't have statements after the "while" :
(for your info : the "default:" statement within a switch statement is optional, so if it doesn't contain any commands you can omit it) 

TRIGGER_CLICK AllNotesOffPanic =
{
   switch($Device)
   {
      case "Hammond":
         SendMidi Hammond CtrlChange $HammondAllSoundsOff 127
         break
      case "Nord":
         SendMidi Nord NoteOff 127 0
         $currentnote=127
         while ($currentnote > 0)
         {
            $currentnote--
            SendMidi Nord NoteOff $currentnote 0
         }
         // don't add any more commands here...
         break
   }
}


Consumption of Memorory #UnO2

Jack Fenton
 

Does a sting like "Hello" consume 5 bytes of memory in the Uno Foorpedal or are they converted to 1 byte tokens before loading them on the FCB-1010

Right now I'm using a lot of strings and ran out of memory on my configuration. I'm thinking if they do not covert to tokens, I can save memory by having them integers.

Also, if I have multiple presets with the same code, it seems to consume more memory

SendMidi  Nord  CntrlChange 0 0 
Snedmidi Nord CntrlChange 32 0 // The value here might change with each preset since I have 5 banks on this device.
SendMidi Nord ProgChange 3 // this is the only thing that currently changes with the preset

I'm wondering if I do this only once as a trigger and then have instead each preset call the same trigger instead with different values of the Program Chaage and CC 32 it might consume less memory. I would not use the trigger directly with any footswitch, however would call it with different values for each.

These would be seen as my "Favorites "  Fav1-FavX



Re: While Statement issue with Uno2 #UnO2

Jack Fenton
 

Yes, I tried that at first but it continues to send notes 0 forever  because  integers in Uno2 cannot go below 0. 


Re: While Statement issue with Uno2 #UnO2

ossandust
 

Will look into it - probably an issue with using a while loop within a switch statement. 
But it would be simpler to just say while($currentnote >= 0)  ... 


While Statement issue with Uno2 #UnO2

Jack Fenton
 

Hi this segment works but I had to add the if statement otherwise the "SendMidi Nord 0 0" still executes even if $Device = "Hammond"

TRIGGER_CLICK AllNotesOffPanic =
{
   switch($Device)
   {
   case "Hammond":
      SendMidi Hammond CtrlChange $HammondAllSoundsOff 127
      break
   case "Nord":
      // Nord does not recognize all notes off so we need to send them manually
      $currentnote=127
      while ($currentnote > 0)
      {
         SendMidi Nord NoteOff $currentnote 0
         $currentnote--
        //Wait 1
      }
      // I had to add this. I think it is a bug with while statement 
      if ($Device == "Nord")
      SendMidi Nord NoteOff 0 0 // This line always executes if the above line is not there
      break
   default:
      break
   }
}



Re: SWEEP NRPN or SysEX #UnO2

Jack Fenton
 

OK, back to BomeBox then to convert CC to NRPN or SysEx.


Re: SWEEP NRPN or SysEX #UnO2

ossandust
 

No, that was possible with the GORDIUS MIDI controllers, but not with UnO2 or TinyBox. 


SWEEP NRPN or SysEX #UnO2

Jack Fenton
 

Hi,
Is there a way to assign a SWEEP to an NRPN or SysEx Message? The Extra Voice volume parameter on my Hammond SK2 uses NRPN or SysEX and not CC message. 


Re: FCB1010 UNO2 Receive #UnO2

Jack Fenton
 

Ouch, OK. Guess I will need to rebuild it.  I usually export this stuff to my Dropbox, however I forgot to do it this time.


Re: FCB1010 UNO2 Receive #UnO2

ossandust
 

The FCB1010 doesn't contain the source code. The editor compiles the source code into binary data before sending it to the FCB1010, there is no way to recover the source from that. 


FCB1010 UNO2 Receive #UnO2

Jack Fenton
 

OK, here is my delemma.

I have my Uno2 configuration installed on my FCB 1010, however my hard disk crashed so I now no longer have the source configuration file? Is there any way to recover it or do I have to rebuild it?
Can I read it from my FCB1010?  If not, I will likely need to create it again from scratch.


Re: Set switch to send incremental CC values?

Mike Watkinson
 

Beautiful! I guess it helps to have a programmer’s brain (I do not lol)

I’ll give it a go and report back

On 13 Mar 2021, at 12:47, ossandust <ossan.dust@...> wrote:

CHANNEL Octavox = 1
VAR $key = 1
 
TRIGGER_CLICK SemiToneUp =
{
   if($key < 121)
      $key += 7
   SendMidi Octavox CtrlChange 83 $key 
}
 
TRIGGER_CLICK SemiToneDown =
{
   if($key > 7)
      $key -= 7
   SendMidi Octavox CtrlChange 83 $key 
}

601 - 620 of 9111