Maestro and the RMA
Pages: 1 2
Chris (121) 472 posts |
Ignorant question #4956 here: Maestro has a little snippet of assembler that runs on start up that checks there’s at least 16K in the RMA, before it runs the app. I’m not sure why it does this. As far as I can see from a quick look at the BASIC source, it doesn’t seem to make use of it. Are there any obvious reasons why it might need to make this check? Or might it be a relic that isn’t needed any more? |
Jeffrey Lee (213) 6048 posts |
It’s probably because Maestro uses the sound scheduler, which (I assume) will allocate from the RMA. Maestro looks like it’s always been a bit memory hungry (the RISC OS 3.6 version happy to take up to 640k, according to git), so for Archimedes machines where you may have had less than that available it was probably important to make sure BASIC didn’t claim all the spare memory and leave SoundScheduler nothing to work with. If Maestro was able to manage its memory dynamically (growing & shrinking its wimpslot as needed) then you could probably get rid of the RMA check. |
Chris (121) 472 posts |
Thanks. I’ll look into the Sound Scheduler. The long term plan is certainly to rework Maestro’s memory management. It currently uses a huge WimpSlot for what are very tiny music files, in order to ensure the fixed allocation is always big enough (as far as I can see, there’s no free space checking at all when adding objects to a score). If it allocated only the memory needed, I’m assuming its footprint would be very much smaller. |
David Feugey (2125) 2709 posts |
And perhaps to solve some issues :) Here (very recent rom and disc image), some demo songs just crash my computer. And the others don’t seems to sound right (Pi 3). Does someone still have an old version made before the facelift? Nota: I have some cursor issues too, so perhaps the problem is in RISC OS itself. |
Alan Robertson (52) 420 posts |
I can’t say I’ve ever had any problem with Maestro on my Pi 3, but I usually just use it to play fanfare :-). Such a nice tune. Always loved it since my BBC A3000 days. The visual improvements to Maestro really has made it a much more appealing application. It would be nice to change the bar numbers to be displayed using an Outline Font, rather than the System Font though. As for the memory/assembly question, I can’t help you at all, but sounds like you could just remove it and see what happens. |
Chris (121) 472 posts |
Send the files to me, and I’ll take a look. chris at cdwraight dot plus dot com |
Rick Murray (539) 13840 posts |
Must resist the temptation to say something disparaging about BASIC’s lack of memory management…
I’d settle for it being capable of actually keeping to time. This is a Maestro file of Erasure’s “A Little Respect”, and a recording (in m4a AAC format as recorded by my phone at the time). It… Sounds abysmal. That “dum-da-da-da-dum” is supposed to run throughout. Not… Well… Enjoy. (recorded with Maestro of December 2018 vintage, and RISC OS 5.23 on a Pi1) |
Rick Murray (539) 13840 posts |
Yes. I did the same sort of thing with Ovation (and since I suck at drawing, Matthew Harris provided a better set of sprites). It’s amazing how clunky the old 2:4 sprites (MODE 12) look, and how much nicer everything becomes with a change to something more in keeping with today’s aesthetic. Maestro looked embarrassingly bad. Now it doesn’t. Good job! I second what Alan suggests – it’s rather unlikely Maestro will be used on anything pre-RiscPC, so I’d just comment out the RMA check and see if it makes any practical difference. |
Andy S (2979) 504 posts |
This is great Maestro’s getting an update. It would be nice if there was an SWI to read how much free, unfragmented memory is available in each area. That would also be useful for my Undo / Redo feature for Paint, since some large sprites could be megabytes in size, the history could quickly fill all available RAM on an older machine. I think GIMP uses up to half of whatever the free RAM is for Undo / Redo. I suppose I could attempt to allocate the largest amount of memory possible first, see if it fails and then progressively reduce it to something more reasonable, or would that risk locking up the system? |
Jeffrey Lee (213) 6048 posts |
Module area: OS_Module 5 These should work down to RISC OS 3 Since Paint uses flex, you don’t have to worry about interrogating the C library’s heap, so the largest block that you’re guaranteed to be able to allocate from application space can be calculated via: min(Wimp_SlotSize free pool size, OS_ReadDynamicArea appspace max size - OS_ReadDynamicArea appspace current size) - 128 The “-128” is a fudge factor to take into account the block header size and anything else flex does internally (I’m not sure what the exact value should be!)
Yeah, claiming all the free memory is certainly risky. A reasonable rule of thumb could be to leave |
Chris (121) 472 posts |
David, did you try and send me those files? I’d be happy to test out against the current and original versions of Maestro.
Yes, it would. I might look into using sprites derived from a suitable font. In case of interest, the version I’m working on right now handles ties properly (ie extends them, and offers a choice of over or under the notes. You can see the difference in the two images below, which also shows the difference being able to put more than one rest in a column makes (ie, you can actually score multi-part staves properly): |
Colin Ferris (399) 1814 posts |
Any help to use CLib calls from BASIC! |
David Feugey (2125) 2709 posts |
OK, it’s solved… or not :) I have a sound that crashes completely my computer. The module loads, but the computer crashes if I try to play the sound (abort on data transfer + filecore in use, etc.). Nota: it crashes too when I try to play it with SoundCon. That’s very strange. This sound is ‘scanned’ or ‘used’ with some Maestro files, and not some others. For example with ShostF7., but not BackFXVI. I have also a problem with crackling noise on my new ROM… Probably not related. |
Colin Ferris (399) 1814 posts |
Have you run the modules through ARMalyser? |
David Feugey (2125) 2709 posts |
--------------------------------- Statistics --------------------------------- Size in words : 2740 100.0% Code : 206 7.5% surmised : 0 0.0% uses PSR : 0 0.0% not ARM2/3 : 7 3.4% not 32 bit : 0 0.0% unpredictable : 0 0.0% Data : 2534 92.5% surmised : 2479 97.8% Warnings : 0 0.0% Unidentified : 0 0.0% --------------------------------- On the other hand, it should not crashes the system when playing with SoundCon. |
Chris (121) 472 posts |
Currently Maestro files only record the voice number associated with a channel, and this order can vary from system to system. The file spec provides for the names of the voices to be saved too, but this feature was never implemented. When it is, you’ll be able to properly control which actual voice generators are linked to each channel, rather than hoping that the order is the same on every computer the music’s played on. Until then, you can manually change the voice number used by Maestro in the Instruments window to avoid the problematic voice generator. |
Steve Drain (222) 1620 posts |
In Acorn User Sep/Oct 1993 Dave Acton presented the SCLMod, which made CLib routines available through SWIs. I had a fiddle with it, adding a couple of routines to see how it worked. 5 years back I revisited it and made it work on an up-to-date machine. I am not sure how the copyright works, but you are welcome to look. It has SWIs for: memcpy memmove qsort bsearch fopen fclose fprintf fscanf printf scanfIf you are just wanting to manage a heap above HIMEM there are easier ways. My Heap library might suffice. |
Jean-Michel BRUCK (3009) 359 posts |
Bonsoir, |
Chris (121) 472 posts |
That looks great! Can I send you my local copy of BachFXVI in Maestro format, to see if Rhapsody can load it OK? I’ve used some of the reserved bits in the file spec to implement rest positioning and tie extension, and would be interested to know if Rhapsody can still load the files. |
Jeff Doggett (257) 234 posts |
There’s a link to the textile reference at the bottom of the page when composing a post. To insert an image just put ! at each end of the url without spaces.
|
Jean-Michel BRUCK (3009) 359 posts |
To Chris: Yes, |
Jean-Michel BRUCK (3009) 359 posts |
I was going to forget: JO Linton did a very good job, it would be a shame to let it get lost, especially as in the field of music scores there is a lack because I do not think there will be a version Sibelius with 32-bit Risc OS and today’s hardware. |
Chris (121) 472 posts |
Thanks Jean-Michel. The most recently released version of Maestro (2.13) doesn’t extend ties, but it does allow you to position rests vertically. I have a test version here that extends ties also, but it’d be good to test both features, to ensure that any files making use of them import into Rhapsody 2. Do you have an email address I can use, to send you a test file? You’d be welcome to email me at ‘chris at cdwraight dot plus dot com’. To use the purple quote blocks, use the bq. Quote here
|
Jean-Michel BRUCK (3009) 359 posts |
jmc.bruck@orange.fr |
Chris (121) 472 posts |
Thanks. The Maestro file format is documented here, and is almost up to date with the latest changes. These are:
I’ll drop you a line with a few files to test. |
Pages: 1 2