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 Composing > Playing digi samples with a tune running at 12x or over.....?
2006-11-28 00:38
Conrad

Registered: Nov 2006
Posts: 839
Playing digi samples with a tune running at 12x or over.....?

Hi.

Is is possible to play samples using a tune playing at say 12x speed or maybe over.... rather than using a standard NMI interrupt routine?

After all, samples are played by basically altering $d418's low nybble (volume) ... just curious if a music player could achieve this by playing at 12x or such.

At the same time also, you could have cool ringtone effects playing in 1 to 3 voices AND play digis at the same time (and also have clear sharp filters possibly).
2006-11-28 02:21
Stryyker

Registered: Dec 2001
Posts: 465
Samples are typically played anything from every third to every tenth rather line. Why not do the experiment? You can play samples using IRQ too or not using any interrupts. 12x would be less than half of the typical sample play rate.
2006-11-28 04:18
ChristopherJam

Registered: Aug 2004
Posts: 1391
12x would still only give you a 50*12=600Hz sample rate - any frequency components over 300Hz (around middle C) would be completely lost.

As a rough guide, you need at least a 2000Hz sample rate for barely intelligible speech, probably more like four or five thousand for any kind of worthwhile instrument.

I think you'd need more like a 100x player to do digis this way!
2006-11-28 08:11
Stryyker

Registered: Dec 2001
Posts: 465
And the player routine would probably use too many cycles if it does things other than just play the sample.
2006-11-28 08:41
Dane
Account closed

Registered: May 2002
Posts: 421
The digis in Digital Magic are replayed every second line and do not use NMI interrupt. They still sound like crap though. :/
2006-11-28 09:03
algorithm

Registered: May 2002
Posts: 702
Then there is the 'hammerfist' part in Wonderland 6 which removes all borders, topbottomleftright full screen rotating (sort of) sprites and digi. good for its time
2006-11-28 09:17
Style

Registered: Jun 2004
Posts: 498
Quote: The digis in Digital Magic are replayed every second line and do not use NMI interrupt. They still sound like crap though. :/

Thats the magic :)
2006-11-28 09:49
Dane
Account closed

Registered: May 2002
Posts: 421
Nah, the magic part was more about sideborder opening and 8 sprites on FLI while playing those (crap) digis.

I really should do a sequel some day.
2006-11-28 10:23
Style

Registered: Jun 2004
Posts: 498
I started to do a demo part with open sideborders, rasters (every 2 lines), digi track and a fullscreen sideborder scroller......

I really should get back to it
2006-11-28 12:05
Mace

Registered: May 2002
Posts: 1799
There's already a demo doing full-screen rasters with scroller in all borders, playing digi music.

But damn me if I can think of its name...
2006-11-28 12:07
SIDWAVE
Account closed

Registered: Apr 2002
Posts: 2238
New Limits
2006-11-28 12:10
chatGPZ

Registered: Dec 2001
Posts: 11165
XAKK did it aswell in "microsleep"

<3
2006-11-28 12:14
Conrad

Registered: Nov 2006
Posts: 839
@ChristopherJam

Yea, I just realised about the minimum Hz for a clear digi sample, which would be at least 2000Hz.

This would be:
2000Hz / 50Hz = 40x player.... OMG!

Hmmmmm... coming to think of it, a player could be made which would do a different job in each call (i.e. one call would work on just voice 1, then the next call would work on voice 2, them voice 3, then filter, blocks, etc) Using optimisation, each call could use about say 4 rasterlines, where in each call you could alter $d418 at the same time using, sample data. Then taking 40x as 28 in hex, that would be:

4 * 28 = $a0 rasterlines, which would fit nicely within max number of rastertime on a c64...except u cant have any cool visual effects in the background i.e. sideborder, or even rasterbars :(


But anyway... as it seems this would be too complicated (yet phenominal) to do, so i would think sticking to NMI interrupts would be better. Besides, with NMI you can also alter the frequency of the sample, allowing pitch shifting etc, where doing that in an IRQ would be IMPOSSIBLE!
2006-11-28 12:23
Mace

Registered: May 2002
Posts: 1799
That's the one, Rambones.
Thanks ;)
2006-11-28 12:37
chatGPZ

Registered: Dec 2001
Posts: 11165
Quote:
Besides, with NMI you can also alter the frequency of the sample, allowing pitch shifting etc, where doing that in an IRQ would be IMPOSSIBLE!


hu? explain
2006-11-28 12:39
Dane
Account closed

Registered: May 2002
Posts: 421
Depends on how you do the IRQ of course.
2006-11-28 13:07
JackAsser

Registered: Jun 2002
Posts: 1997
Also for the record:

CIA1 timers produces IRQ
CIA2 timers produces NMI
VIC produce IRQ.
RESTORE produce NMI.
BRK produce IRQ.
etc..

So, when you speak of NMI I guess you mean "using timer interrupts (CIA2)"... and when you speak of IRQ I guess you mean "using VIC raster interrupts".

2006-11-28 13:10
Cruzer

Registered: Dec 2001
Posts: 1048
Sample/raster stuff in this classic as well... Mixer
2006-11-28 14:41
algorithm

Registered: May 2002
Posts: 702
And another demo in the wonderland series (Displayed a FLI pic of a dragon) with VSP and digi's
2006-11-28 15:46
trident

Registered: May 2002
Posts: 85
Allright if we should boast about our digi + border effect code, I'll do that too :). Hellfork, all-border playable Wolfenstein clone with sampled sound effects over SID music.
2006-11-28 17:13
Oswald

Registered: Apr 2002
Posts: 5034
*yawn* hmm anyone around that can do something more complex than digis together with rasters ? how about some hot filledvector talk, who can come up with the fastest 3d rot, linedraw, and fill routine ?
2006-11-28 20:39
trident

Registered: May 2002
Posts: 85
Quote: *yawn* hmm anyone around that can do something more complex than digis together with rasters ? how about some hot filledvector talk, who can come up with the fastest 3d rot, linedraw, and fill routine ?

Hmmm, didn't someone say something about digis with all-border filled 3d? ;)
2006-11-28 21:25
Conrad

Registered: Nov 2006
Posts: 839
Quote: Also for the record:

CIA1 timers produces IRQ
CIA2 timers produces NMI
VIC produce IRQ.
RESTORE produce NMI.
BRK produce IRQ.
etc..

So, when you speak of NMI I guess you mean "using timer interrupts (CIA2)"... and when you speak of IRQ I guess you mean "using VIC raster interrupts".



yes. Sorry about that, must be the way I said it :p
2006-11-28 21:35
Oswald

Registered: Apr 2002
Posts: 5034
trident, well anything is possible, how about a 50 fps phong torus in 64x64 pixels on the sideborder with digis ? :)
2006-11-29 08:36
Style

Registered: Jun 2004
Posts: 498
Oswald has done it all :)
2006-11-29 11:52
Stryyker

Registered: Dec 2001
Posts: 465
IRQ via CIA 1 works fine for samples with some care. I remember experimenting with using two timers to mix two samples in real time. Wasn't good design but worked :)
2006-11-29 17:47
Dane
Account closed

Registered: May 2002
Posts: 421
Quote: trident, well anything is possible, how about a 50 fps phong torus in 64x64 pixels on the sideborder with digis ? :)

Great idea Oswald. I'll write a sideborder tutorial someday.
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
E$G/hOKUtO fOrcE
iceout/Avatar/HF
Freeze/Blazon
grasstust/Hoaxers
Sentinel/Excess/TREX
Hairdog/BOOM!^Dream
REBEL 1
Smasher/F4CG
csabanw
Airwolf/F4CG
iAN CooG/HVSC
CA$H/TRiAD
Yogibear/Protovision
Guests online: 105
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Uncensored  (9.6)
7 Comaland 100%  (9.6)
8 No Bounds  (9.6)
9 Aliens in Wonderland  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 Cubic Dream  (9.6)
3 Party Elk 2  (9.6)
4 Copper Booze  (9.6)
5 Rainbow Connection  (9.5)
6 It's More Fun to Com..  (9.5)
7 Dawnfall V1.1  (9.5)
8 Birth of a Flower  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Morph  (9.5)
Top Groups
1 Nostalgia  (9.4)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Offence  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Stinsen  (9.7)
3 Jeroen Tel  (9.6)
4 Linus  (9.6)
5 MacMagix  (9.6)

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