AudioMate II core design fast version 1.0 for Boor/BeerGarden ============================================================= This is supplement to Boor's original design. This doesn't respect ANY busines thigns, and just pure copy internal architecture. What end suer seems doesn't need to be necessary clean archtecture, because it can be 'too openned/complicated' for average caveman. Terms ----- Is pretty important to use same terms for same thigns. So, let's start. line................physical audio line - mono:1 stereo:2 dolby surround:3 (5) etc. every line consists of 'physical' samples at some bitrate/frq samples can be integer / float (BIG question !!!!) channel.............audio channel consists from one or more lines. audio channels represent real 'output'. If we have stereo output we have 1 channel but 2 lines track...............something what control creating/destroying of channels. track itselfs have NOTHING common with channel. track plays notes. notes are creating channels (in dependency on NNA, etc.) dsp.................thingy which process some count of input channels and produces some count of output channels. dsp have '2' numbers representing count of incomming and outputmming channels in form "i:o". for example, output device typically is 1:0 - one input and no output (coz it sends to speakers). typical effect is 1:1 - one input, one output. Specical case of 'channel count' is ? which means 'count on fly' - or 'more channels' wire................connection between 2 dsp modules. inside wire can flow more channels effect..............effect (filter, ...) is special case of dsp output device.......winwave/directx/...is again special case of dsp boor................someone living in the middle of nowhere loving beer, sex and drugs Every 'dsp' export some properties. These properties can be accessed by 'script'. Script can be used as destination for 'envelope' or pattern editor commands. dsp itselfs don't know from where they're controlled, if from pattern or envelope, whatever. Envelope -------- One of base parts is envelope. Envelope allows 'executing' script and allows to take in meaning value of plotted datas. It can include more 'values' at one table. Can be executed anything basically. It is simples way how user can control something. Envelop can include vibrato, it can reacts on 'actions'. Actions are products by many parts of am engine. Action is like 'note start', 'note ends', 'fade out', 'sample loop' and user can also add OWN actions and control from pattern editor or something (also from different envelope :o) Samples itselfs also uses envelopes, where angle of envelope means pitch and y axis 'position'. Normal sample is player by envelope like | / | / | / |/ +------------ Looping sample | / / / / / | / / / / / | / / / / / |/ / / / / +--------------------------- (in reallity, it is 'looped' not 'copyied') Reverse sample loop | /\ | / \ | / \ |/ \ +----------- etc. Loops are also fully custom and can be controlled from otehr parts of am engine. If we have effect which provides 2 control values (freq and depth for example) one envelope can have '2' lines. Pretty simple and powerfull. Mixing ------ In all ways, we need to 'mix' some channels togetehr at some point. Mix just simple take specified count of channels and mix together. Note: AM doesn't have 'global' volume. Global volume is just 'decrement' property of 'last' mixer before 'device' (see mix scheme). Every 'channel' and 'tracks' have name. Channel can be 'physical' or 'logical'. Physical is number, randomly allocated during playing song. Logical is composer given name (can be also number, or letters, etc.) Dsp --- Thing explained above. There are few special cases: 1. effect - 1:1 2. output device - 1:0 3. channel source - 0:1 - called 'ch' in Mixing (physical channel) - 0:1 - called 'track' in Mixing (sends all channels produces by given track list) 4. mixer - ?:0 - mixes (some way) more 'channels' Cases 2,3 doesn't do any real 'dsp'. Mix scheme ---------- AM internally holds 'route' of sound. It is best explainable throw diagram. Used shortcuts: cs - physicall channel source + - mixer od - output device (winwave for ex.) ef - some effect - - wire with one channel = - wire with more channels 'Normal it2 scheme' (cs)=============(+)-----------(od) cs is 'sets' to send all tracks 'Orchestrial scheme' (cs1)===========(+)-------(ef1)---------(+)----------(od) / (cs2)===========(+)-------(ef2)--------/ / (cs3)===========(+)-------(ef3)------- cs1 - sets to accept all 'strings' (all channels which are using strings) - we can also call string layers cs2 - solors cs3 - background (drum , etc.) Every of these '3' groups is mixed together (it have own 'global' volume, balance, pos, etc. !) then it aplies all effects (ef here) and then it is mixed together and played on some device. Ofcourse, every of channels which are sended by some tracks can use 'own' effects, because, if we will look into 'details' of 'cs1' it can look like: (channel1)------------------> (channel5)------------------> [in above picture cs1] (channel8)-------(effect)---> .... (note: 1,5,8 are physicall channels, allocated by NNA, whatever) Or some 'hard' scheme: (cs1)===========(+)-------(ef)---------(+)---(ef)---(od) / (cs2)===========(+)-------(ef)--------/ / (cs3)===========(+)-------(ef)------/ / (cs4)-----(ef)--(ef)--(ef)--------/ cs1,2,3 - accept some 'tracks' cs4 - accept only channel 'solo' (see logical channel names) This scheme apply few effects (stacically !) on channel 'solo' and some effects globally on 3 layers, and then effect on 'final' output. Static / dynamic effect ----------------------- Static effect is effect drawed inside 'mixer route'. It is created before song start playing. Dynamic effect is effect alocated inside notes. It requires a bit more CPU while playing but no next difference. Every channel have limit for runtime effect (I guess it will be sets to 4 or something)