svn version freezes for short moments

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

svn version freezes for short moments

CarlM
Hi,

first of all: Thanks for this great program!

I compiled my first svn-copy from 4-nov-2009 and everything works well with this version. Yesterday 20-nov-2009 I tried a new svn-version but this one freezes several times for short moments when playing.
I use Ubuntu 9.10 with nvidia graphics and usb midi interface midiman 1x1.

Carl
Reply | Threaded
Open this post in threaded view
|

Re: svn version freezes for short moments

Louis B.
Administrator
Thanks for the feed back. I am getting ready for a new release
although Christmas may get in the way. so I'd like to get to the
bottom of this before the release.


Can you give me svn revision number of the two version and I'll try it
here as I use Ubunu 9.10 on an eeepc.

Try deleting the pb.ini file (but save a copy for me first) is is in ~/.config
Have you got settings/preferences/ video optimisation turned on?

On Sat, Nov 21, 2009 at 11:11 AM, CarlM [via Piano Booster]
<[hidden email]> wrote:

> Hi,
>
> first of all: Thanks for this great program!
>
> I compiled my first svn-copy from 4-nov-2009 and everything works well with
> this version. Yesterday 20-nov-2009 I tried a new svn-version but this one
> freezes several times for short moments when playing.
> I use Ubuntu 9.10 with nvidia graphics and usb midi interface midiman 1x1.
>
> Carl
>
> ________________________________
> View message @
> http://n2.nabble.com/svn-version-freezes-for-short-moments-tp4042272p4042272.html
> To start a new topic under Piano Booster Users, email
> [hidden email]
> To unsubscribe from Piano Booster Users, click here.
>
Reply | Threaded
Open this post in threaded view
|

Re: svn version freezes for short moments

CarlM
I think it could be something with the usb because when I start the last version (80) of pb and move around with the mouse the cursor freezes and stops also for short moments. When I run my previous version (76) nothing happens. Same effect with the deleted pb.ini.

I checked this with video optimisation turned on and off.

The svn revision numbers are 76 and 80.

Here is my pb.ini file:

[General]
CurrentSong=//tmp/test.mid

[midi]
input=MidiSport 1x1:0
output=MidiSport 1x1:0
latency=0

[Keyboard]
RightSound=1
WrongSound=7
RightSoundPrevious=1
lowestNote=0
highestNote=127

[display]
openGlOptimise=true

[score]
timingMarkers=true
noteNames=false
courtesyAccidentals=false
stopPointMode=0

[window]
pos=@Point(28 48)
size=@Size(973 600)
Reply | Threaded
Open this post in threaded view
|

Re: svn version freezes for short moments

Louis B.
Administrator
Hi,

I have just run some tests and revision 80 runs much better for me. I tried to simulate your problem by dragging a window round with the mouse and 80 ran better on my set-up. I am using the underpowered eeePC 1.6Ghz dual core atom processor. I did my tests running fluidsynth using this command line.

fluidsynth -C 0 -R 0 -c 6 -z 128 -r 22050 -l -a alsa -o audio.alsa.device=plughw:0 -o midi.alsa_seq.id=fs /usr/share/sounds/sf2/FluidR3_GM.sf2 /usr/share/sounds/sf2/FluidR3_GS.sf2
 
What CPU are you using and what freq. Is it dual core? (Dual core definitely helps with PB). What synth are you using?

On version 80 I have upped the timer tick from 12msec to 4 msec for the midi but the grapichs should still be running at 12msec.

You could try reverting to 12msec change GlView.cpp (rev 80) line 349 to 12 as per the line below

    m_timer.start(12, this ); // fixme was 12 was 5


Also turn on OPTION_BENCHMARK_TEST by changing it to 1 (in Cfg.h) and post the results.

Thanks

Louis
Reply | Threaded
Open this post in threaded view
|

Re: svn version freezes for short moments

CarlM
Solved, infos later.

Carl
Reply | Threaded
Open this post in threaded view
|

Re: svn version freezes for short moments

CarlM
Hi Louis,

I resolved it for me but dont know the exact background of this behavior.

First of all my equipment:

Intel Atom 230 1.60GHz, 2048MB, nVIDIA GeForce 9400 (IGP), Ubuntu 9.10
M-Audio USB Uno 1X1 MIDI Interface
Yamaha PSR-290 Keyboard

I had some troubles when playing midi files with the keyboard and the midi interface so I started pb always with sudo. Yesterday I compiled svn revision 80 with OPTION_BENCHMARK_TEST and noticed that the troubles appear only when I start pb with sudo. I managed my environment so that I am able to run all as non root user and no more freezes take place as you can see in the bechmark output. During the playing of the midi file I moved arround with the window to make heavy load. The cpu rate was in both instances in the same range.

pb with sudo:
Bench 0: ct  302, min  0, avg 3,738, max 12 frame 18,255 timer enter
Bench 1: ct  302, min  0, avg 0,020, max  1 frame 18,258 m_song task
Bench 2: ct  107, min  0, avg 5,075, max 445 frame 51,533 enter
Bench 4: ct  107, min  0, avg 0,131, max  8 frame 51,533 drawDisplayText
Bench 5: ct  107, min  0, avg 0,000, max  0 frame 51,533 drawAccurracyBar
Bench 6: ct  107, min  0, avg 0,047, max  2 frame 51,533 drawBarNumber
Bench 8: ct  107, min  0, avg 0,290, max 15 frame 51,533 glTranslatef
Bench 9: ct  107, min  0, avg 0,009, max  1 frame 51,533 glCallList
Bench10: ct  107, min  0, avg 0,103, max  2 frame 51,542 drawScroll
Bench11: ct  107, min  0, avg 0,019, max  1 frame 51,542 exit
Bench19: ct  103, min  0, avg 36,631, max 2692 frame 53,524 timer exit
Bench 0: ct  471, min  0, avg 3,735, max 15 frame 10,631 timer enter
Bench 1: ct  471, min  0, avg 0,072, max  1 frame 10,628 m_song task
Bench 2: ct  158, min  0, avg 0,025, max  1 frame 31,684 enter
Bench 4: ct  158, min  0, avg 0,000, max  0 frame 31,684 drawDisplayText
Bench 5: ct  158, min  0, avg 0,000, max  0 frame 31,684 drawAccurracyBar
Bench 6: ct  158, min  0, avg 0,006, max  1 frame 31,684 drawBarNumber
Bench 8: ct  158, min  0, avg 0,070, max  1 frame 31,684 glTranslatef
Bench 9: ct  158, min  0, avg 0,070, max  1 frame 31,684 glCallList
Bench10: ct  158, min  0, avg 0,475, max  1 frame 31,677 drawScroll
Bench11: ct  158, min  0, avg 0,000, max  0 frame 31,677 exit
Bench19: ct  158, min  0, avg 19,684, max 1543 frame 31,614 timer exit

pb as non root:
Bench 0: ct  962, min  0, avg 3,978, max 45 frame 5,207 timer enter
Bench 1: ct  962, min  0, avg 0,009, max  3 frame 5,207 m_song task
Bench 2: ct  331, min  0, avg 2,659, max 448 frame 15,133 enter
Bench 4: ct  331, min  0, avg 0,094, max 17 frame 15,133 drawDisplayText
Bench 5: ct  331, min  0, avg 0,015, max  1 frame 15,133 drawAccurracyBar
Bench 6: ct  331, min  0, avg 0,021, max  2 frame 15,133 drawBarNumber
Bench 8: ct  331, min  0, avg 0,372, max 21 frame 15,136 glTranslatef
Bench 9: ct  331, min  0, avg 0,006, max  1 frame 15,136 glCallList
Bench10: ct  331, min  0, avg 0,115, max  5 frame 15,136 drawScroll
Bench11: ct  331, min  0, avg 0,015, max  1 frame 15,136 exit
Bench19: ct  327, min  0, avg 0,254, max  6 frame 15,284 timer exit
Bench 0: ct 1216, min  0, avg 3,840, max 35 frame 4,112 timer enter
Bench 1: ct 1216, min  0, avg 0,102, max  1 frame 4,112 m_song task
Bench 2: ct  398, min  0, avg 0,123, max  1 frame 12,563 enter
Bench 4: ct  398, min  0, avg 0,038, max  1 frame 12,563 drawDisplayText
Bench 5: ct  398, min  0, avg 0,010, max  1 frame 12,563 drawAccurracyBar
Bench 6: ct  398, min  0, avg 0,013, max  1 frame 12,563 drawBarNumber
Bench 8: ct  398, min  0, avg 0,143, max  1 frame 12,560 glTranslatef
Bench 9: ct  398, min  0, avg 0,018, max  1 frame 12,560 glCallList
Bench10: ct  398, min  0, avg 0,055, max  1 frame 12,563 drawScroll
Bench11: ct  398, min  0, avg 0,015, max  1 frame 12,563 exit
Bench19: ct  398, min  0, avg 0,103, max  5 frame 12,555 timer exit

Thanks,
Carl
Reply | Threaded
Open this post in threaded view
|

Re: svn version freezes for short moments

Louis B.
Administrator
Ok I know what the issues is, I was experimenting with set_realtime_priority(SCHED_FIFO, rt_prio); it obviously make it worse for you when running as root. (realtime_priority really needs to be run in its own thread.) non root it was not allowed. I have disabled it now.

By the the screen/lcd refresh rate should be 60 Hz I found that the best setting (a system setting not a pb setting).

Louis