Up till now have linked fiducial IDs to sounds, and sorted out the display, so that white line distorts itself depending on all music files being played.
At the moment trying to sort something out re; volume. Since for now we are coding using keyboard inputs, will code with that in mind, shouldn't be too hard to convert once we move to fiducial inputs.
Have attached the package I'm working with (sound files included) on my dropbox as a .rar
It is password protected, will give password out via skype/facebook
When opening .pde note that there are currently two methods to link the fiducials to the sound files..by directly stating symbol.put(x, ), or symbol.put(x, key =='a')
Where x = Symbol ID, and 'a' is a regular keyboard key. Further down in the code we've got a method to link keyboard keys to sounds. My issue here is I am not sure how the program will react to removing of fiducials if making use of keyboard linking, and am predicting that music might not stop playing.
Thanks
EDIT: have sorted volume using shiftVolume(float, float, int) method
ReplyDeleteWhere:
float1 = current volume
float2 = new volume
int = time frame
will test it once im done copying for different clips, but should work well, for now using keyboard input to alter volume
UPDATE: shiftVolume was acting up, apparently it tends to be buggy in certain situations..instead went for setGain(+2) and setGain(-2) ... so far so good
ReplyDeleteUPDATE(II): Slight bug when setting gain as mentioned in above update.
ReplyDeleteOriginal code looked something like this:
if ( key == 'R' )
{
clarinet.setGain(+5);
}
//when increasing volume
however rather than increasing volume by 5, this would set volume to 5.
This has been sorted by creating volume variables which will be used as a go between for the desired volume, and setGain() code
i.e.
if ( key == 'Q' )
{
volq = volq + 5;
acoustic.setGain(volq);
}
Will continue playing around, but can't see much else going wrong until fiducials introduced
*fingers crossed*
Check out updated code (mplayerv2.rar)
ReplyDeletehttps://www.dropbox.com/home/Novel%20Grp%20D?select=mplayerv2.rar#/Novel%20Grp%20D:::
same password as mplayer1.rar just ask me for it via skype or facebook.
New version has got working volume controls, and slightly cleaner code.
Next thing to work on: Variables set aside for user audio
nice kev :) will extract and play with the code some more.
ReplyDelete