#86 arp2600 uses huge hardware resourses

closed-fixed
5
2010-12-26
2010-12-09
Anonymous
No

this problem is detectable on versions from 0.50.X It's practically impossible to use arp2600 with latency lower than 1024 i had no such problems when i was using 0.40.X versions

Discussion

  • Nick Copeland

    Nick Copeland - 2010-12-09

    I think this is probably releated to a feature from 0.50.6 where the ARP will register audio in, two audio out as it has always done but will also register 4 CV in and 4 cv out ports as well. You might get better results if you use '-multi 0'. I will do some tests witih the default of 4 pairs of extra IO and see what my results are, there may be a bug here as the IO should be reasonably efficient.

    startBristol -jack -arp2600 -multi 0

    The order is required since the option -arp2600 will default to 4 extra IO pairs, you then have to reset it to zero afterwards.

     
  • Nick Copeland

    Nick Copeland - 2010-12-09
    • labels: --> Bristol Engine
    • assigned_to: nobody --> ncopeland
     
  • Nick Copeland

    Nick Copeland - 2010-12-10

    There is no audio difference here between period sizes of 128 and 1024. There are some very minor CPU load differences however they are not considered to be excessive:

    -count 1024 -multi 4: bristol uses about 15% CPU, jackd 1%
    -count 1024 -multi -0: bristol uses about 14% CPU, jackd 1%
    -count 128 -multi 4: bristol uses about 15% CPU, jackd 3%
    -count 128 -multi -0: bristol uses about 14% CPU, jackd 1%

    In short, multi appears to use about 1% more CPU in the bristol engine and depending on how you want to look at it either 2% more in jack (for 128/multi) or 200% more (3% vs 1%). Using multi does require 3 times as many buffer read/write operations to be called from the engine to the jack daemon. This was all done on a speedstepping CPU clocked down to 800MHz, the picture at '-g performance' gives about a quarter of all the above values. The values do not seem excessive although multi does have some net cost.

    Would it be possible to get an example ARP memory that was used for the tests? The one used here had a reasonable patch, ie, there were diverse cables routing audio signals within the ARP but with an example memory it would be possible to see if there were any patches arrangements that need to be reviewed for load. The patches would be found in ~/.bristol/memory/arp2600/arp2600<#memory>.mem

    nick.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-12-10

    starting arp2600 on version 0.6.7 didn't form any data in ~/.bristol folder so i will paste you the data from my terminal:

    biser@ubuntustudio:~$ startBristol -jack -arp2600
    jackstats found -rate 48000 -count 128
    checking availability of TCP port 14418
    using port 14418
    starting logging thread [@1291994729.289842]
    Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2010
    This program comes with ABSOLUTELY NO WARRANTY; for details type `<Ctrl> w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `<Ctrl> g' for details of GPL terms.
    starting logging thread [@1291994729.290730]
    Dec 10 17:25:29 bristol [0.100053] starting console logging [@1291994729.289842]
    Dec 10 17:25:29 bristol [0.100258] bristol version 0.60.7
    Dec 10 17:25:29 bristol [0.100289] bristol
    Dec 10 17:25:29 bristol [0.100307] -rate 48000
    Dec 10 17:25:29 bristol [0.100325] -count 128
    Dec 10 17:25:29 bristol [0.100342] -jack
    Dec 10 17:25:29 bristol [0.100359] -arp2600
    Dec 10 17:25:29 bristol [0.100375] -port 14418
    Dec 10 17:25:29 bristol [0.100393] jsm will use 'startBristol -jack -arp2600'
    Dec 10 17:25:29 bristol [0.100411] generate bandlimited waveforms(31, 12, 84, 1.50, 0.80, 48000)
    Dec 10 17:25:29 brighton [0.100290] starting console logging [@1291994729.290730]
    Dec 10 17:25:29 brighton [0.100631] arp2600 emulation defaults:
    Dec 10 17:25:29 brighton [0.100666] -voices 1
    Dec 10 17:25:29 brighton [0.100686] -retrig
    Dec 10 17:25:29 brighton [0.100707] -lvel
    Dec 10 17:25:29 brighton [0.100727] -hnp
    Dec 10 17:25:29 brighton [0.100745] -wwf
    Dec 10 17:25:29 brighton [0.100764] -multi 4
    Dec 10 17:25:29 brighton [0.100782] -detune 100
    Dec 10 17:25:29 brighton [0.100801] -gain 2
    Dec 10 17:25:29 brighton [0.100820] -pwd 2
    Dec 10 17:25:29 brighton [0.100839] -glide 5
    Dec 10 17:25:29 brighton [0.100858] -curve 520
    Dec 10 17:25:29 brighton [0.100877] brighton version 0.60.7
    Dec 10 17:25:29 bristol [0.101586] Fixing samplerate at 48000
    Dec 10 17:25:29 bristol [0.101710] rescheduled thread: 40
    Dec 10 17:25:29 bristol [0.106886] midi jack: 128.1
    Dec 10 17:25:29 bristol [0.106946] Opened listening control socket: 14418
    Dec 10 17:25:29 bristol [0.106970] opened control socket
    Dec 10 17:25:29 bristol [0.106991] midiOpen: 14418(100)
    Dec 10 17:25:29 bristol [0.107010] opened midi device 128.1
    Dec 10 17:25:30 brighton [1.100384] brighton
    Dec 10 17:25:30 brighton [1.100456] -jack
    Dec 10 17:25:30 brighton [1.100490] -arp2600
    Dec 10 17:25:30 brighton [1.100511] -port 14418
    Dec 10 17:25:30 brighton [1.101678] starting event management thread
    Dec 10 17:25:30 brighton [1.102966] connected to :0.0
    Dec 10 17:25:30 brighton [1.103136] display is 1920 by 1080 pixels (0, 0)
    Dec 10 17:25:30 brighton [1.103395] Window is w 1920, h 1080, d 24, 0 0 0
    Dec 10 17:25:30 brighton [1.104916] Using DirectColor display
    Dec 10 17:25:30 brighton [1.140856] Initialise the arp2600 link to bristol: 0x23ec720
    Dec 10 17:25:30 brighton [1.141288] bristolMidiTCPActive(localhost, 0)
    Dec 10 17:25:30 brighton [1.141725] hostname is localhost, bristol
    Dec 10 17:25:30 brighton [1.143470] TCP port: 14418
    Dec 10 17:25:30 bristol [1.145314] Accepted connection from 0 (4) onto 1 (6)
    Dec 10 17:25:30 brighton [1.145203] Connected to the bristol control socket: 6
    Dec 10 17:25:30 brighton [1.145264] bristolengine already active (0)
    Dec 10 17:25:30 brighton [1.201984] opened GUI midi handles: 0, 0
    Dec 10 17:25:30 bristol [1.405393] rescheduled thread: 65
    Dec 10 17:25:30 bristol [1.405455] registering jack interface: bristol
    Dec 10 17:25:30 bristol [1.549316] initialising arp2600
    Dec 10 17:25:30 bristol [1.655210] bristolMidiJackOpen(bristolmt, 2, 203)
    Dec 10 17:25:30 bristol [1.659887] reused jack registration
    Dec 10 17:25:31 brighton [2.158228] user r 1000/1000, e 1000/1000
    Dec 10 17:25:31 brighton [2.158654] Read Configuration: arp2600 (null)
    Dec 10 17:25:31 bristol [2.464632] Found port system:playback_1
    Dec 10 17:25:31 bristol [2.464698] Found port system:playback_2
    Dec 10 17:25:31 bristol [2.464719] Found port system:midi_playback_1
    Dec 10 17:25:31 bristol [2.464735] Found port system:midi_playback_2
    Dec 10 17:25:31 bristol [2.464747] Found port system:midi_playback_3
    Dec 10 17:25:31 bristol [2.464760] Found port system:midi_playback_4
    Dec 10 17:25:31 bristol [2.465040] Found port system:midi_playback_5
    Dec 10 17:25:31 bristol [2.465611] Found port system:midi_playback_6
    Dec 10 17:25:31 bristol [2.465652] Found port system:midi_playback_7
    Dec 10 17:25:31 bristol [2.465667] Found port system:capture_1
    Dec 10 17:25:31 bristol [2.465680] Found port system:capture_2
    Dec 10 17:25:31 bristol [2.465692] Found port system:midi_capture_1
    Dec 10 17:25:31 bristol [2.465705] Found port system:midi_capture_2
    Dec 10 17:25:31 bristol [2.465718] Found port system:midi_capture_3
    Segmentation fault
    biser@ubuntustudio:~$ Dec 10 17:25:31 brighton [2.542915] going operational
    Dec 10 17:25:31 brighton [2.543207] midi write error, fd 6, size 1

     
  • Nick Copeland

    Nick Copeland - 2010-12-10

    Wow, nice debug, you get a seg fault. That would cause some problems with playing it.

    You may or may not have got a 'core' file, it does not state that any core was saved but if you did get one:

    gdb bristol core
    or
    gdb /usr/local/bin/bristol core

    The do

    thread apply all bt

    That will give me a backtrace to look at. There is some other stuff here though: jack is reporting all the MIDI interfaces when I do the scan for autoconnect which is not a good thing. You are also running SVN jack (I think) as you have Jack Session Manager operating, I was not aware it had gone into release yet. If you do use an SVN version that should not be an issue, I have tested with it whilst doing the JackSM implemtation and you seem to have the header files and libraries in the right location otherwise the ./configure for bristol would not have found the JSM settings in the header files.

    You are also using Jack MIDI, perhaps that is related - 0.40 did not have Jack MIDI only ALSA. I take it you want to use Jack MIDI?

    Do you always get this segfault or just this time? What flags do you normally use to start bristol, ie, with a larger period size when it works?

    Regards, nick.

     
  • Nobody/Anonymous

    I cannot start arp2600 on period-size 128 ,but the suggested solution with "-multi 0" actually helps. i am using jack2 1:1.9.6 from ppa:falk-t-j/lucid with alsa seq option on the settings on ubuntustudio 10.04 and i would like arp2600 to be started with 1click on monobristol, rather with special command on the terminal because that is really an inspiration killer.

     
  • Nobody/Anonymous

    like i said "multi 0" option makes arp2600 to work. I paste you the terminal data

    biser@ubuntustudio:~$ startBristol -jack -arp2600 -multi 0
    jackstats found -rate 48000 -count 128
    checking availability of TCP port 49600
    using port 49600
    starting logging thread [@1291997359.472962]
    Copyright (c) by Nick Copeland <nickycopeland@hotmail.com> 1996,2010
    This program comes with ABSOLUTELY NO WARRANTY; for details type `<Ctrl> w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `<Ctrl> g' for details of GPL terms.
    starting logging thread [@1291997359.473542]
    Dec 10 18:09:19 bristol [0.100000] starting console logging [@1291997359.472962]
    Dec 10 18:09:19 bristol [0.100423] bristol version 0.60.7
    Dec 10 18:09:19 bristol [0.100458] bristol
    Dec 10 18:09:19 bristol [0.100477] -rate 48000
    Dec 10 18:09:19 bristol [0.100494] -count 128
    Dec 10 18:09:19 bristol [0.100512] -jack
    Dec 10 18:09:19 bristol [0.100529] -arp2600
    Dec 10 18:09:19 bristol [0.100546] -multi 0
    Dec 10 18:09:19 bristol [0.100563] -port 49600
    Dec 10 18:09:19 bristol [0.100582] jsm will use 'startBristol -jack -arp2600 -multi 0'
    Dec 10 18:09:19 bristol [0.100600] generate bandlimited waveforms(31, 12, 84, 1.50, 0.80, 48000)
    Dec 10 18:09:19 brighton [0.100756] starting console logging [@1291997359.473542]
    Dec 10 18:09:19 brighton [0.101142] arp2600 emulation defaults:
    Dec 10 18:09:19 brighton [0.101348] -voices 1
    Dec 10 18:09:19 brighton [0.101542] -retrig
    Dec 10 18:09:19 bristol [0.102110] Fixing samplerate at 48000
    Dec 10 18:09:19 bristol [0.102213] rescheduled thread: 40
    Dec 10 18:09:19 brighton [0.101780] -lvel
    Dec 10 18:09:19 brighton [0.103748] -hnp
    Dec 10 18:09:19 brighton [0.103772] -wwf
    Dec 10 18:09:19 brighton [0.104718] -multi 4
    Dec 10 18:09:19 brighton [0.104741] -detune 100
    Dec 10 18:09:19 brighton [0.104759] -gain 2
    Dec 10 18:09:19 brighton [0.105200] -pwd 2
    Dec 10 18:09:19 brighton [0.105230] -glide 5
    Dec 10 18:09:19 brighton [0.105364] -curve 520
    Dec 10 18:09:19 brighton [0.105387] brighton version 0.60.7
    Dec 10 18:09:19 bristol [0.107101] midi jack: 128.1
    Dec 10 18:09:19 bristol [0.107237] Opened listening control socket: 49600
    Dec 10 18:09:19 bristol [0.107279] opened control socket
    Dec 10 18:09:19 bristol [0.107301] midiOpen: 49600(100)
    Dec 10 18:09:19 bristol [0.107321] opened midi device 128.1
    Dec 10 18:09:20 brighton [1.100823] brighton
    Dec 10 18:09:20 brighton [1.100898] -jack
    Dec 10 18:09:20 brighton [1.100931] -arp2600
    Dec 10 18:09:20 brighton [1.100951] -multi 0
    Dec 10 18:09:20 brighton [1.100969] -port 49600
    Dec 10 18:09:20 brighton [1.102760] starting event management thread
    Dec 10 18:09:20 brighton [1.103602] connected to :0.0
    Dec 10 18:09:20 brighton [1.103785] display is 1920 by 1080 pixels (0, 0)
    Dec 10 18:09:20 brighton [1.104686] Window is w 1920, h 1080, d 24, 0 0 0
    Dec 10 18:09:20 brighton [1.105858] Using DirectColor display
    Dec 10 18:09:20 brighton [1.138034] Initialise the arp2600 link to bristol: 0x25b7720
    Dec 10 18:09:20 brighton [1.138349] bristolMidiTCPActive(localhost, 0)
    Dec 10 18:09:20 brighton [1.138544] hostname is localhost, bristol
    Dec 10 18:09:20 brighton [1.139552] TCP port: 49600
    Dec 10 18:09:20 brighton [1.140033] Connected to the bristol control socket: 6
    Dec 10 18:09:20 bristol [1.140375] Accepted connection from 0 (4) onto 1 (6)
    Dec 10 18:09:20 brighton [1.140256] bristolengine already active (0)
    Dec 10 18:09:20 brighton [1.202951] opened GUI midi handles: 0, 0
    Dec 10 18:09:20 bristol [1.406178] rescheduled thread: 65
    Dec 10 18:09:20 bristol [1.406234] registering jack interface: bristol
    Dec 10 18:09:21 bristol [1.541996] initialising arp2600
    Dec 10 18:09:21 bristol [1.655770] bristolMidiJackOpen(bristolmt, 2, 203)
    Dec 10 18:09:21 bristol [1.660987] reused jack registration
    Dec 10 18:09:21 brighton [2.200570] user r 1000/1000, e 1000/1000
    Dec 10 18:09:21 brighton [2.200638] Read Configuration: arp2600 (null)
    Dec 10 18:09:21 bristol [2.475527] Found port system:playback_1
    Dec 10 18:09:21 bristol [2.475585] Found port system:playback_2
    Dec 10 18:09:21 bristol [2.475601] Found port system:midi_playback_1
    Dec 10 18:09:21 bristol [2.475614] Found port system:midi_playback_2
    Dec 10 18:09:21 bristol [2.475626] Found port system:midi_playback_3
    Dec 10 18:09:21 bristol [2.475637] Found port system:midi_playback_4
    Dec 10 18:09:21 bristol [2.475648] Found port system:midi_playback_5
    Dec 10 18:09:21 bristol [2.475659] Found port system:midi_playback_6
    Dec 10 18:09:21 bristol [2.475672] Found port system:midi_playback_7
    Dec 10 18:09:21 bristol [2.475683] Found port system:capture_1
    Dec 10 18:09:21 bristol [2.475695] Found port system:capture_2
    Dec 10 18:09:21 bristol [2.475707] Found port system:midi_capture_1
    Dec 10 18:09:21 bristol [2.475718] Found port system:midi_capture_2
    Dec 10 18:09:21 bristol [2.475730] Found port system:midi_capture_3
    Dec 10 18:09:21 brighton [2.520575] going operational

     
  • Nick Copeland

    Nick Copeland - 2010-12-10

    > rather with special command on the terminal because
    > that is really an inspiration killer.

    Yeah, I hear you. Now a couple of years ago I was going to do this kind of interface then along came monoBristol. There is other stuff going on in this arena such as desktop integration and a runcom file that bury parameters behind the icons but that is not as flexible as this kind of launching application.

    Let me know how it goes without the multi option - is that available in monoBriistol yet? If it is not in monoBristol yet you have an issue, the runcom is set before the emulator is requested so they get overridden. I could fix that at some point with pre and post directives in the runco, again, that does not help you here.

    At some point I will try and test with the same jack revision as you have.

     
  • Nick Copeland

    Nick Copeland - 2010-12-11

    Coded some changes to the way bristolrc is handled. If it contains the tokens PREARGS or POSTARGS then these will be respectively prepended and appended to the user options given to startBristol. This gives a lot more flexibility with regards to parameter ordering:

    PREARGS=-count 1024 -rate 48000
    POSTARGS=-jackstats -jack -multi 0

    Using such contents then the command 'startBristol -mini' would be expanded to

    startBristol -count 1024 -rate 48000 -mini -jackstats -jack -multi 0

    This should allow correct functioning of monoBristol even with flags it does not recognise - especially the ones that are sensitive to ordering. The attached file applies to 0.60.7 as a patch, the fix will go into 0.60.8.

    This does leave one open point: the segfault. I really would like to have a look at this but I need the submitter to provide the gdb output 'thread apply all bt' to the corefile as documented in other comments of this report.

     
  • Nick Copeland

    Nick Copeland - 2010-12-11

    Parameters patch to 0.60.7 startBristol.in

     
  • Nick Copeland

    Nick Copeland - 2010-12-11

    The attached startBristol.in goes into bristol-0.60.7/bin then you need a './configure' before a make install.

     
  • Nick Copeland

    Nick Copeland - 2010-12-11

    And I suppose I should also change the -multi option to default to zero?

     
  • Nick Copeland

    Nick Copeland - 2010-12-11

    This change has now also been made. If you want the file attached here so you can use it just let me know, otherwise the fix will go into the next release, 0.60.8.

    Kind regards, nick.

     
  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2010-12-12

    Thank you very much.

     
  • Nick Copeland

    Nick Copeland - 2010-12-22

    This is now pending closure with alternations being submitted to 0.60.8 due out presently.

     
  • Nick Copeland

    Nick Copeland - 2010-12-22
    • status: open --> open-fixed
     
  • Nick Copeland

    Nick Copeland - 2010-12-23

    Pending

     
  • Nick Copeland

    Nick Copeland - 2010-12-23
    • status: open-fixed --> pending-fixed
     
  • Nick Copeland

    Nick Copeland - 2010-12-26
    • status: pending-fixed --> closed-fixed
     
  • Nick Copeland

    Nick Copeland - 2010-12-26

    Closed

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks