StudioSound 2.00
Colin Ferris (399) 1818 posts |
Looks like 2 pc}^ instructions at the end of !StudioSnd.Code Rick’s !Scan32bit – is handy for a quick check of code – perhaps it could be updated to catch ’SWP’s’ :-) |
Rick Murray (539) 13861 posts |
Yikes. I barely even remember that program. I’ll need to see if I can hunt down the sources… |
Henrik Bjerregaard Pedersen (3011) 58 posts |
Raik – I think the very high sample rates probably explains it. Perhaps StudioSound doesn’t handle memory allocation correctly when it has to do resampling. I will try if I can find a way to simulate the 88200 Hz rate, to see if I can provoke the error. Thanks for the help. |
Raik (463) 2061 posts |
Strange coincidence that I have chosen from the approximately 2000 files the one that makes problems. At 99% the error would not have occurred ;-) I just have sent a mail to Willi Theiss (maintainer of the OMAP5 port). Maybe he can help. Thanks for your effort to make the program usable again. |
Jon Abbott (1421) 2652 posts |
In addition to the issues in Code and SoundS16x2, all of the DSP code contains non-32bit instructions. All of these issues will go unnoticed pre ARMv7, as they’ll execute as expected. On ARMv7 however, they’ll be treated as a NOP. |
Raik (463) 2061 posts |
Thats the reason why it crash at start on my BeaglexM and my Pandora. But what is the reason why it works on my ARMX6 and IGEPv5? |
Henrik Bjerregaard Pedersen (3011) 58 posts |
I “borrowed” SoundS16x2 from the old !ARMovie, never bothered to check if it was 32 bit safe. There may be another problem which explains what Raik is experiencing. The Replay code uses SWI Sound_SampleRate to try to find a sample rate which is lower than the requested sample rate (the loop at offset &02A8), but if the hardware only supports 88200 and 96000 kHz, then it fails but doesn’t return an error, it just continues. If anyone would like to try to develope a driver which doesn’t use the old Replay code, or perhaps patch the Replay code so that it works, then I’d be happy to help in any way. Perhaps even set up a bounty. |
David Feugey (2125) 2709 posts |
A bounty for Replay would be a good idea. |
Jon Abbott (1421) 2652 posts |
You may want to consider writing your own sample playback code, using SharedSound which I believe will also solve the sample rate issue. In the meantime, a quick win would be to fix all the non-32bit instructions so it’s at least ARMv7 compatible. I wrote a patcher earlier, to confirm it was the non-32bit instructions causing the crash on loading, if it’s any help. |
Henrik Bjerregaard Pedersen (3011) 58 posts |
I have no problem on the Pi 2, so I am not aware of any ARM7 issues. The soruce for the current playback driver is already included in !StudioSnd, anybody are free to use it to develope a driver which works on other platforms. |
Raik (463) 2061 posts |
Looks like my wave-archive was corrupt… have made a new upload. |
Jon Abbott (1421) 2652 posts |
I detailed the locations of all the non-32bit instructions for you above. Cortex A7 will execute LDMFD R13!,{xxx, PC}^ as expected when issued in USER, Cortex A53 however will treat it as a NOP. As a consequence you won’t notice the non-32bit instructions on a Pi2, but will on a Pi3. |
Henrik Bjerregaard Pedersen (3011) 58 posts |
Raik – at www.henrikbp.riscos.fr there is a link to a zip file containing the source for a modified version of the old Replay code used by the !Replay driver in StudioSound. The link is just below the StudioSound screenshot – the file is named drvsrc.zip . Any chance you might be willing to give it a try? It creates a new version of the file SoundS16x2 that tries to handle if the requested frequency (eg. 44.1 kHz) is lower than the available rates (88.1 / 96 kHz on you hardware). The changes are at around line 2200. It is not the best fix, but if it works then I’ll improve it a bit. |
Raik (463) 2061 posts |
For the IGEPv5 it looks like it works. I only found the time for a short try. The applaus/wav that failed before is working now. Thanks a lot. |
Raik (463) 2061 posts |
@Henrik Willi has made any changes (32bit and zeropain) in StudioSound. Now it works with my Pandora (OMAP3)… |
Henrik Bjerregaard Pedersen (3011) 58 posts |
Raik – sounds good. |
Henrik Bjerregaard Pedersen (3011) 58 posts |
I have just uploaded a new version of StudioSound, version 2.04 – should be available in PackMan tomorrow. It fixes a few bugs (thanks Jon, Raik, Willi) and introduces a few new features, the most important of which is the introduction of “drum tracks”; drum tracks are intended for samples that don’t need the envelope and are always played in full. |
Norman Lawrence (3005) 172 posts |
Henrik |
Henrik Bjerregaard Pedersen (3011) 58 posts |
Norman – thanks for trying out StudioSound. I plan to spend some time improving StudioSound, hopefully there are users who want to contribute, so I am looking for people to help out with these tasks:
If anyone would like to help out, let me know. |
Raik (463) 2061 posts |
Documentation: A PDF made from my paper one you find here The other points I will help, if I can, but not today ;-) |
Henrik Bjerregaard Pedersen (3011) 58 posts |
Raik – thanks for the PDF, but the printed version is outdated. The samples are interesting, but what is the copyright status? |
Chris (121) 472 posts |
Henrik – I’d be very happy to help out with icon design. I could be wrong, but is the current set based on sprites I sent to you a (very) long time ago? I’ve got a vague memory of doing some work on the original StudioSound iconset. In any case, I can happily do some more, if that would be helpful :) |
Henrik Bjerregaard Pedersen (3011) 58 posts |
Chris – thanks for the offer, and thanks for the current icons. The new icons are needed for the new “drum track” feature, where each segment/sample is displayed as an icon representing an event, rather than as a bar representing a duration. The icons will also be used in a kind of library of available instrument samples. So we need two sizes of each icon: 32×32 and 12×12 pixels. I think we should use 256 colours, default palette. !StudioSnd.Sprites22 includes an icon named “drum0”, 16×24px if memory serves me. This will be used as background for the 12×12 version, so they should have a mask. It would be great if you could also improve “drum0”. Perhaps we could have 4-5 version of it, in different colours. I am afraid it sounds like a shopping list, but those are the icons needed at the moment. Any help would be appreciated. |
Raik (463) 2061 posts |
All are free downloads. I have look at any sites I downloaded from… Declared as free, freeware or free for non commercial use. The tracks with a copyright I have (e.g. from my Yamaha keyboard) I not have uploaded. |
Henrik Bjerregaard Pedersen (3011) 58 posts |
StudioSound 2.05 is now available in PackMan. See the !Help file for a list of changes. |