![]() |
![]() |
#1 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,761
|
Optimized Player 6.1 Playroutine 'p6107.lha'
Important: I've updated The Player (P61) playroutine since this post! The latest version, P6112 is available from Aminet. Use that instead.
Spent more time than expected on optimizing p6106.lha from Aminet. Optimization was done last weekend+Monday for testing a bunch of modules, and then I tried SetPosition (the routine to jump to a certain songposition under program control), and it didn't work. Well, it didn't work in the original either, most likely it has never worked with compressed patterndata. So the routine was probably untouched since the playroutine versions before ThePlayer came ![]() After digging into the original code even more (bluergh) and using what I learned when I recoded the decrunch-part, I made it aware of the compression scheme, and it worked. Then I made it callable on any P61_cn (on any frame) and take effect immediately. While I was there I noticed a bug in SetPosition that was also present in Bxx/Dxx/NextPattern, but not in P61_Init, to set the 'new pattern trackdata ptrs'. This is probably seldom noticed, it only takes effect when compressed patterndata is >32K. The new correct code also was a few cycles faster. This took several days and lots of cursing, and then it was time for final-testing, documentation and general cleanup. I ran speed measurement of all the modules and made a table, which showed "playroutine takes max 5.5 scanlines instead of 7.5" for all modules. Except one, the worst case one, which was only 1.7 scanlines faster instead of 2. I also uploaded it to Aminet just now, so it should be available there soon I hope. I've delved deeper than anyone since the original authors, I think. (And I hated every minute of it. :P) So if you have questions or feedback, ask me now before I've forgotten everything. ![]() There's a lot of documentation and comments in the sources and readme though. Last edited by Photon; 28 February 2015 at 23:50. |
![]() |
![]() |
#2 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Legendary work Photon!
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Sep 2001
Location: No(R)Way
Age: 42
Posts: 3,258
|
Real cool work man!!
|
![]() |
![]() |
#4 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 551
|
Nice, but it's still based on protracker which wasn't really good to begin with and didn't exploit the whole range of Paula's capabilities.
|
![]() |
![]() |
#5 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
|
|
![]() |
![]() |
#6 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 551
|
A brand new protracker
![]() |
![]() |
![]() |
#7 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
A new version of ProTracker would be nice.
But what would a new version need in order to be the daddy...? |
![]() |
![]() |
#8 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 551
|
Cleaner code (basically restarting from zero using the same look for the interface with a more modern twist), more octaves, waveforms envelopes and maybe modulations presets for instruments.
Last edited by hitchhikr; 14 March 2010 at 00:26. |
![]() |
![]() |
#9 |
Junior Member
Join Date: Aug 2001
Location: France
Posts: 1,392
|
isn't it called DigiBooster tracker ?
|
![]() |
![]() |
#10 |
Global Moderator
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 32,587
|
|
![]() |
![]() |
#11 |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 551
|
Frog: Digibooster was just a clone of protracker with 8 channels (no envelopes or anything fancy). Digibooster pro imported several FastTracker II features (like volume envelopes) but won't work on an A500 (it needs a 68020 minimum) also afaik it uses AHI (so probably no Paula) and the replay routine is outrageously huge and yes, it's a closed source commercial product.
|
![]() |
![]() |
#12 |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,761
|
Thx 4 kudos!
Tried Musicline? What I've heard of it reveals that the quality is there. When it comes to music programs that go beyond the Protracker features, envelopes are fine, and you can do some effects basically for free, but as soon as you add more channels and/or sound processing, you're looking at a lot more CPU time consumed. For the ordinary solutions - buffering and sound mixing - this needs to take place frequently and on time, which means a frequent interrupt which must finish in time for the next interrupt. On the 68000, this solution basically means "not too much CPU/DMA used besides playing the music, or it will be run ass-slow". Which means that for games or demos, or even normal Workbench use, you need 68020 and probably fastram. Extra octaves is easy, just sample the instrument for a couple of octaves to increase the range. There's no other way of magically making very low notes sound good on any platform. The only thing you can do if quality is lacking on a sample "that is already on your harddisk" is to resample+filter+eq it in a high-end program, or convert it from 16-bit to "14-bit" and add even more CPU processing to the replay. At the high octaves end, there is no way to beat the 28KHz limit other than feed individual samples to Paula very rapidly using an interrupt or similar, which on 68000 will steal a huge chunk of the CPU time just because ...the musician won't resample a sound? ![]() I like Protracker, and I like how sampled instruments/vocals give more life to a song. I'm not saying I don't love chipmusic, because I'm guilty of having fresh.ogg on while coding a lot of the time ![]() The Amiga isn't really made for chipmusic, which was invented for lower spec home computers that had synthesizer chips to help the slow CPU play sounds. Amiga steps that up to a different technology, samples, and helps the slow CPU play samples. Porting chipmusic to Amiga makes it awkward, and raising the bar to PC specs (more channels, higher quality) makes it even more of a bastard ![]() Also, no high end music program will make a song interesting or enjoyable. Composition and 'immersion in the barrage of sounds' is at least to me what makes me play a song again. There I go, lecturing (or informing) again. But it was like, 'musicians want just a few more channels and just play it an octave higher, how hard can it be!?' and ... this is how hard it can be. ![]() I bet you know all this already. But actually I got some ideas while typing (a favorite hobby of mine) this. I already have some 8 channel experiments with synth-like effects from back when, but I have many projects I need to finish before I start on a whole new music program. If you don't mind stepping up the specs though, check out MusicLine. It has 8 channels, chip music instruments and samples. Last edited by Photon; 15 March 2010 at 02:19. |
![]() |
![]() |
#13 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
![]() With all those demos and games using ProTracker songs and sooooo many classic .mods and great memories from listening to that stuff it can't be *that* bad. ![]() So, again, great work on the replayer code fixes. ![]() |
|
![]() |
![]() |
#14 |
Registered User
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
|
Well done Photon!
I did the 610.6 patch and that time I had noticed that SetPos didn't work. But I was unable to fix it, a deep understanding of the p61 working was needed and I don't have it :-( My patch was just the consequence of noticing a evident bug using 020 flag and my own researches on interrupts management on the Amiga. So I am very happy that you finally fixed the stuff! ![]() |
![]() |
![]() |
#15 | |
Posts: n/a
|
Quote:
|
|
![]() |
#16 | |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Great fix Photon, thanks a lot
Quote:
A common mistake is to return from an interrupt, in which you call the replay routine, before the interrupt request bit has been cleared, and the interrupt might trigger immediately again and the replay routine gets called twice. Maybe that's it? |
|
![]() |
![]() |
#17 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,761
|
Quote:
There are two things I don't understand in your description: 1) need some pattern positions? Make the song longer by inserting one or two whole patterns? I think you mean the musician forgot to put an Fxx command in the very first step in the first pattern of the song? If there is no Fxx command there, you get F06 by default. 2) after a reboot? You sure you don't mean song restart? If the song changes speed during the song, and it not reset at the very first step (see 1)), then it will continue at the last set speed and not revert to default speed 6 - as it would if you start playing the module from the start. You can test this in Protracker if you set speed 2 as default in the Setup panel. All the songs that play correctly then have set the speed properly. |
|
![]() |
![]() |
#18 |
Posts: n/a
|
Guys, I mixed things up. The bug I mentioned was inherent to Tracker Packer and could be fixed by playing the module for a moment, then restarting it. Sorry for the confusion.
@Leffmann: I am not actively trying to get it working right now. My observation was from ten years ago, when I made P61 work on A4060 and integrated it into my demosystem in the first place. |
![]() |
#19 | |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Quote:
![]() |
|
![]() |
![]() |
#20 | |
Posts: n/a
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Super Optimized P6108.lha playroutine :) | Photon | Coders. General | 15 | 07 November 2013 18:15 |
Looking for ArtOfNoise Playroutine (68k assembler) | Herpes | Coders. Asm / Hardware | 5 | 05 September 2012 00:10 |
Tracker/Playroutine to play tubular.mod | Photon | Coders. General | 15 | 10 March 2006 21:09 |
Optimized Protracker playroutine? | Photon | Coders. General | 10 | 11 June 2005 00:54 |
|
|