Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Music fading, file loading
2004-07-31 08:31
Optimus

Registered: Jan 2002
Posts: 122
Music fading, file loading


I don't know anything about music coding, more than just initialiazing and calling the player. But how easy it is to fade out the music? Do I have to write SID code? My last choice would be to write the music so that it fades in one point, but perhaps I would prefer to press a key and music fading at any point..

Then, is there a system call or anything to load a PRG file from the disk? So that I can load from my asm code the next part of my demo. A simple example..

p.s. I know I should be searching this in my docs instead before asking here, but somehow I felt I don't have much time. I hope you can give me an answer, I am still learning a bit..
 
... 4 posts hidden. Click here to view all posts....
 
2004-08-02 09:03
Oswald

Registered: Apr 2002
Posts: 5017
optimus:

most (or all?) "modern" music players have a subroutine for fadeout. Look at the player, you should find more jmps than just those 2 to the play and the init routine. Check what the rest of the jmps do, you should find one that plays with d418, or controlls some other part of the player that writed d418.

btw, about d418: the lowmost 4 bits are for the volume, and the 4th bit (4th, if you count em from 0) is for filter, now as 99.9% of music uses filter better leave this bit on, if you plan to controll d418 "manually".

for faaast loading download this release:

Fixup #$00

read the note for instructions.

you should know, that fastloaders replaces the code inside the 1541, so there's a quite big init routine for those loaders with the code for the drive, that will be send into the drive during init. Now this part you can run only once, then forget about it, and just have the loader in the memory.

happy coding!
2004-08-04 20:06
ready.

Registered: Feb 2003
Posts: 441
I was looking for an IRQ loader a few months ago, I found useful The Dreams loader. Look at http://www.the-dreams.de Go to the source-codes section and download Dreamload V2.3, I found it easy to use. Also get the XA assembler to compile the loader source code from the same site. Hope you've got all ya need, if not just ask. later Ready.
2004-08-19 20:57
St0fF

Registered: Oct 2002
Posts: 40
music fading: well yes, most newer players have a fade routine. on the other hand: the volume is very rarely changed in most tracks, if it gets changed at all - so just count down the register of the player, where the volume resides(the one that or_s in the low nybble before storing to $d418). nothing is easier than this.
Dreamload: has very low transfer speed for 2bit transfer if you don't have a lot of rastertime. it's in the way Doc Baccy coded the transfer - doing the gcr-decode while transferring ...
2004-08-19 22:29
Cruzer

Registered: Dec 2001
Posts: 1048
Talking about loaders, if you want the easiest solution, then use a non-irq loader. This means no music/gfx while loading, but it's faster, fills less and is much easier to use.

For instance you can rip the loader I have used in You Know The Routine 1+2. In the first part of YKTR1 it's placed in $0a00-$0bff, but has to be copied to $c000 before loading. Then you just need to put the filename (or some of the first chars followed by a '*') into $c1e3, and jsr $c000 to load a file.
2004-08-20 07:42
HCL

Registered: Feb 2003
Posts: 716
A fast IRQ-loader reaches about 75% speed of a fastloader, and you can play music + show gfx meanwhile. -> The break will feel much longer with a fastloader (my opinion).
2004-08-20 09:42
JackAsser

Registered: Jun 2002
Posts: 1989
Agree, and an IRQ-loader isn't that hard to use either, just make sure that the image you're displaying and the music you're playing + the code for handling this doesn't collide with the new part that you're loading.

/JackAsser
2004-08-20 13:27
Cruzer

Registered: Dec 2001
Posts: 1048
I'm not sure I believe that 75% of fastloader speed, but anyway, the main advantage of a fastloader is that it only fills about $200 bytes. This means that the previous part can use all the remaining $fe00 bytes (99.2% of the mem.) An irq-loader takes more, plus you need some gfx or other stuff that also eats bytes => less memory for the previous effect.
2004-08-20 18:36
Graham
Account closed

Registered: Dec 2002
Posts: 990
no argument actually, since an irqloader once installed also is about 1 to 2 blocks in memory. the one in deus ex machina uses less than $0200 bytes, but $0100 bytes is translation tables which can be avoided with better code.
2004-08-20 19:35
hollowman

Registered: Dec 2001
Posts: 474
the smallest version of krills loader i've used takes $0100 bytes after install.
2004-08-21 01:04
Cruzer

Registered: Dec 2001
Posts: 1048
$100 for an irq-loader? Guess I'm outta excuses then. :) Ok, you still need some extra space for loader gfx/fx, but if the memory is filled up I guess you could just have a blank screen w/ music for a little while, while loading some loadertainment-stuff.

Guess it would be possible to make a fastloader that fills less than $100 though, if it was installed once like an irq-loader. And I would still recommend the fastloader option for n00b's like Optimus. :)
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mike
Oswald/Resource
Apollyon/ALD
Matt
JackAsser/Booze Design
Genius/Xenon
chesser/Nigaz
Didi/Laxity
Guests online: 132
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Carrion  (9.8)
2 Joe  (9.8)
3 Duce  (9.8)
4 Mirage  (9.7)
5 Facet  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.128 sec.