Search found 22 matches

by noot
Wed Oct 29, 2008 7:58 am
Forum: Coding Questions
Topic: #PB_Sound_Multichannel
Replies: 0
Views: 727

#PB_Sound_Multichannel

This might be something really simple, but I just can't figure it out...

I'm trying to do a little program that plays soundfiles using MIDI input, and polyphonically (using #PB_Sound_Multichannel). The problem is, when a midi note message comes in, I have something like

channel = PlaySound (0 ...
by noot
Fri Oct 17, 2008 6:42 am
Forum: Coding Questions
Topic: Midi Monitor
Replies: 41
Views: 29248

einander wrote:

Code: Select all

PokeL(@OutDev, 0)  : PokeL(@InDev, 1)
Hey, I changed the InDev value from 1 to 0 and now it works :D

einander, thanks so much for this great stuff - can't wait to start working with this! :)
by noot
Thu Oct 16, 2008 7:06 pm
Forum: Coding Questions
Topic: Midi Monitor
Replies: 41
Views: 29248



Procedure MIDIin(hMi, wMsg, dummy, Data1, Data2)



Ah well, there it was: the code at the PureArea archive says


Procedure MIDIin(hMi, wMsg, Data1, Data2)


Now it starts up ok, but I don't get anything when I push the keys :(

What I want to do is to trigger and control certain events ...
by noot
Wed Oct 15, 2008 8:17 pm
Forum: Coding Questions
Topic: Midi Monitor
Replies: 41
Views: 29248

hi,

could anyone please help me a bit, I'm trying to get started with this midi in stuff... I found this "Midi_In&Out" example from PureArea, but it hangs with "invalid memory access (read error at address 1)" at the MIDIin procedure. the other example (MidiConnecter.pb) seems to work fine.

i'm ...
by noot
Thu Oct 11, 2007 6:52 am
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

Thanks Rescator, I think this will be a huge help! I didn't even
know about threads previously, but if they work like I understand,
looks like a playback thread will solve one or two other problems
as well... I was just going to ask if there is any way to keep the
program from halting when moving ...
by noot
Fri Sep 21, 2007 10:48 am
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

Same here, so apparently it counts 1/3579545's of seconds regardless of hardware - ie. does exactly what a timer should do, and seems to do it pretty very well too!

But yeah, it must be a compatibility issue - and probably an isolated case at that. I'll update the CPU & soundcard drivers to see if ...
by noot
Fri Sep 21, 2007 8:01 am
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

Derek,
that's very interesting - I haven't realized that there could be THAT big a difference, although I normally always do put the states into variables, just for convenience... however, I have to use WaitWindowEvent(1) keeping this whole thing together so I'm afraid it's no help this time ...
by noot
Thu Sep 20, 2007 8:51 pm
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

well i can describe briefly what's inside the loop:

- 4 x soundVolume, soundPan, soundFrequency
- 4 x if...and...and...PlaySound
- some ExamineKeyboard and Select for buttongadgets
- twelve (12) times the following kind of bit (checking trackbar and checkbox values) - this should probably be ...
by noot
Thu Sep 20, 2007 6:38 pm
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

might be time to start optimising any code you can
i don't know if i can, i have about 100 gadgets in this damn thing and i need to monitor them all, and there's really not very much else inside the loop...

but nice to know that it's a Vista problem after all :D apparently anyway
by noot
Thu Sep 20, 2007 6:11 pm
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

I'm using WaitWindowEvent(), it seems to work better here (on XP)

Well now: I tried to strip the program down to just the event loop - getting the time and playing the sounds - and it sort of works under Vista...

so I took the full length program and commented out everything inside the event loop ...
by noot
Wed Sep 19, 2007 8:25 pm
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

OK, I changed it to GetTickCount_(). XP works fine as before, Vista
got even more messed up than with ElapsedMilliseconds(). Now the
program takes up 30-40% CPU all the time and memory usage
increased to 11000...

what about this - does anyone think this could have to do with the fact that the ...
by noot
Wed Sep 19, 2007 5:06 pm
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

thanks for the tip paul, i'll try it with something else (GetTickCount is it?), and maybe also check the driver updates... i'll report back when i see what happens
by noot
Wed Sep 19, 2007 11:45 am
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

this is pre-installed Vista so shouldn't be a problem there...

took off all the extra crap right at the start, and I'm not running any virus shields or anything (while btw on the much slower XP machine I have F-Secure running at the same time and even that doesn't slow the timer down!) - in short i ...
by noot
Wed Sep 19, 2007 8:24 am
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

OK, still on this topic:

I'm still using ElapsedMilliseconds(), and I just ran the program on both machines with the same soundfiles (small) and same parameters, and had a look at the task manager:

old machine (XP): memory usage 8500kb, CPU usage stays between 0-2 percent, no noticable difference ...
by noot
Mon Sep 17, 2007 7:43 pm
Forum: Windows
Topic: timer problem under vista
Replies: 27
Views: 10166

well... thanks, seems to work, but i'll have to rewrite all my programs to implement this :? is there documentation somewhere for timeSetEvent_?