Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

cannot start more than 6 bristol synths

Help
2011-02-13
2013-05-23
  • Mark Hedges
    Mark Hedges
    2011-02-13

    I got bristol to work with rosegarden.  -autoconn helps.  I create a new midi device in rosegarden's midi device manager and map it to the bristol synth midi interface.  Then I hit 'play' and rosegarden controls bristol okay.

    However, I can only start 6 bristol synths before getting the error "Cannot allocate queue: Cannot allocate memory" and subsequent attempts to start synths fail.  (Using `startBristol console -jack -midi seq -autoconn -register bristol-$synth -$synth` for each synth name, started in a script loop.)  Then the error:

    connect failed: Connection refused
    connfailed
    opening link to engine: 5034
    bristolMidiTCPActive(localhost, 1)
    hostname is localhost, bristol
    TCP port: 5034
    connect failed: Connection refused
    connfailed
    unacknowledged request on -4
    

    Do I have to run each bristol on a separate midi device? (Then I can only run six.)  It would be nice to group them.  Is there something wrong with the -mididev option?  I would like to assign client and port myself from my script, iterating and incrementing, to group some of them together.  However I get a lot of trouble.  For example, say I start these:

    startBristol -console -jack -midi seq -autoconn -mini -port 15028 -mididev 50:0
    startBristol -console -jack -midi seq -autoconn -explorer -port 15029 -mididev 50:1
    startBristol -console -jack -midi seq -autoconn -voyager -port 15030 -mididev 50:2
    startBristol -console -jack -midi seq -autoconn -memory -port 15031 -mididev 50:3
    

    I wind up with this:

    client 131: '50:0' [type=user]
        0 '50:0 input      '
    client 132: '50:1' [type=user]
        0 '50:1 input      '
    client 133: '50:2' [type=user]
        0 '50:2 input      '
    client 134: '50:3' [type=user]
        0 '50:3 input      '
    

    or if I try:

    startBristol -console -jack -midi seq -autoconn -mini -register bristol
    startBristol -console -jack -midi seq -autoconn -explorer -register bristol
    startBristol -console -jack -midi seq -autoconn -voyager -register bristol
    startBristol -console -jack -midi seq -autoconn -memory -register bristol
    

    I wind up with:

    client 131: 'bristol' [type=user]
        0 'bristol input   '
    client 132: 'bristol' [type=user]
        0 'bristol input   '
    client 133: 'bristol' [type=user]
        0 'bristol input   '
    client 134: 'bristol' [type=user]
        0 'bristol input   '
    

    How do I group them under the same client, but with different inputs?  Will that enable me to run more than 6 at once?  Sorry if I am missing something fundamental.  Thanks for your help.

     
  • Mark Hedges
    Mark Hedges
    2011-02-13

    oh, it does not matter if I specify -mididev value with : or . as the separator, same results- the value is used as a string and seems to do the same as if I had used it as the value to -register.

     
  • Nick Copeland
    Nick Copeland
    2011-02-13

    The error message you are getting, 'Cannot allocate memory' is not from bristol, ie, I assume it must be ALSA MIDI or Jack audio. It is possible that bristol is 'contributing' to the error but either way this is not a message reported by bristol so I cannot state what the underlying cause is.

    If you want to run all of these synths on a single engine, which is you main question, then you can try the following:

    startBristol -console -jack -midi seq -autoconn -mini -port 15028
    startBristol -console -jack -midi seq -autoconn -explorer -port 15028 -engine -channel 2
    startBristol -console -jack -midi seq -autoconn -voyager -port 15028 -engine -channel 3
    startBristol -console -jack -midi seq -autoconn -memory -port 15028 -engine -channel 4

    You should now get a single engine, it will open one pair of output ports into Jack and mix all synths onto the same stereo outputs. It will register a single MIDI port with ALSA (probably on 128.0) and you can use a separate MIDI channel to drive each synth independently.

    The -mididev and -register options are actually the same: -mididev is specific for the MIDI library, the -register option will set both MIDI and Audio name options for some of the drivers.

    Now you also reported a failure to link to the engine on port 5034, this is most likely due to the port either being in use, in holddown or similar. If you leave out the -port option then bristol will take a random port number and check that it is free. If you specify a port then it has to be free or things fail. If you want to use multiple emulators with a single engine then you do have too specify the port number as you have done. An alternative is to use '-host unix:1234' this uses UNIX domain sockets that are less likely to be in use.

    Kind regards, nick