AminetAminet
Search:
84714 packages online
About
Recent
Browse
Search
Upload
Setup
Services

mus/edit/harmonics.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:A simple additive synthesizer
Author:Kim Fastrup Larsen
Uploader:kimflarsen hotmail com (Kim Fastrup Larsen)
Type:mus/edit
Version:1.3
Architecture:m68k-amigaos
Date:2018-12-14
Download:http://aminet.net/mus/edit/harmonics.lha - View contents
Readme:http://aminet.net/mus/edit/harmonics.readme
Downloads:1423

New in version 1.3

- Prevent possible resource leaks by making sure requesters
  are ended before closing a project window


Introduction

Harmonics is a simple sound synthesizer program. Waveforms
are created by adding sine waves of different frequencies and
amplitudes. You are limited to working with 12 different fre-
quencies: The base frequency (called the first harmonic), the
base frequency × 2 (the second harmonic), the base frequency
× 3 (the third harmonic), and so on, up to the base frequency
× 12 (the twelfth harmonic).

Full source code included.


How to use Harmonics

Harmonics are added to the waveform simply by adjusting the
twelve sliders that determine the amplitude of each harmonic.
Setting a slider to zero (far left) leaves that harmonic out
of the waveform altogether. The resulting waveform is scaled
to use the full amplitude range.

You can test the waveform by playing tones with the keyboard.
The top two rows will give about an octave and a half to play
with, and the next two rows will let you play the next deeper
octave plus a bit. There are five octaves in total, and you
can choose which octaves are available on the keyboard using
keys F1-F4. If you manage to get sounds "stuck" by doing
things like changing octave while playing tones, you can kill
all sound by hitting the space bar.

Harmonics projects contain simply the setting of the twelve
sliders and so are very small files. In order to use your
sounds in other programs, you must use the "Export IFF" faci-
lity of the program. This will save a 5-octave IFF 8SVX sound
file that most Amiga music software will be able to load.

As mentioned above, the program generates 5 octaves of wave-
form data. However, you should observe the following limita-
tions:

Harmonics 5-8 may be inaudible or distorted in the highest
octave, and harmonics 9-12 may be inaudible or distorted in
the two highest octaves. Harmonics 1-4 will sound fine in all
octaves.

Therefore, if you wish to make use of all 5 octaves, you may
want to limit yourself to harmonics 1-4, and likewise, if you
wish to use all but the highest octave, you may only want to
use harmonics 1-8. If you need only the lower 3 octaves, you
will have no problems with any of the harmonics.


About the code

Version 1.1 of this program is a complete rewrite. The design
goals remain the same, however. It was originally created as
the sort of software you would have wanted for your Amiga
500/2000, and I deliberately limited myself to features
available in Kickstart 1.2 as a design exercise. None of this
has changed with the new version.

One of the main goals of the rewrite was to have one and only
one event loop handling everything including requesters. This
was achieved using callbacks, which also facilitated separa-
tion of user interface and project logic. Modularizing the
code was another goal.

Although it is not actually utilized, the code has been de-
signed with a multi-project capability in mind, In order to
introduce multi-project handling, you would in principle only
need to make a few changes to the "tool" module, which han-
dles the project logic, although in practice you would want
to make some changes to the "ui" module as well to accomodate
this.

The "guitools" module contains routines that can lay out
menus to look just like Gadtools, as well as functions to
easily create and reuse a couple of different types of re-
questers.

This program allocates sound channels dynamically when they
are actually needed to play sounds. The audio device features
a way of letting multiple programs play sounds and music si-
multaneously by stealing channels from each other and freeing
them up as soon as possible, and this program demonstrates
that - you can start up multiple instances and play in all of
them at once. This is handled by the "audio" module, which is
an abstraction layer on top of the audio device.

There are more modules, e.g. the "piano" module that imple-
ments the polyphonic keyboard, the "waveform" module that
generates the 5 octaves of samples, and the "io" module which
handles saving and loading.


History

1.3 (Dec 14, 2018)

- Prevent possible resource leaks by making sure requesters
  are ended before closing a project window

1.2 (Sep 6, 2018)

- Minor fixes and tweaks

1.1 (Aug 28, 2018)

- Polyphonic keyboard
- Completely rewritten

1.0 (Sep 6, 2004)

- Original release.


Contents of mus/edit/harmonics.lha
PERMISSION  UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP     NAME
---------- ----------- ------- ------- ------ ---------- ------------ ----------
[unknown]                  344     900  38.2% -lh5- 6fc7 Dec 15 01:27 Harmonics.info
[unknown]                  335     894  37.5% -lh5- e61e Dec 15 01:27 Harmonics/Examples.info
[unknown]                   14      24  58.3% -lh5- b5ae Dec 15 01:27 Harmonics/Examples/Church
[unknown]                  246     368  66.8% -lh5- 20ef Dec 15 01:27 Harmonics/Examples/Church.info
[unknown]                   24      24 100.0% -lh0- 14b5 Dec 15 01:27 Harmonics/Examples/Sawtooth
[unknown]                  248     368  67.4% -lh5- 5382 Dec 15 01:27 Harmonics/Examples/Sawtooth.info
[unknown]                   24      24 100.0% -lh0- ae0f Dec 15 01:27 Harmonics/Examples/Square
[unknown]                  228     350  65.1% -lh5- 4e64 Dec 15 01:27 Harmonics/Examples/Square.info
[unknown]                12641   35147  36.0% -lh5- 7994 Dec 15 01:27 Harmonics/gpl-3.0.txt
[unknown]                  190     370  51.4% -lh5- 7b95 Dec 15 01:27 Harmonics/gpl-3.0.txt.info
[unknown]                10552   16524  63.9% -lh5- a443 Dec 15 01:27 Harmonics/Harmonics
[unknown]                  266     602  44.2% -lh5- e42c Dec 15 01:27 Harmonics/Harmonics.info
[unknown]                 2369    5160  45.9% -lh5- 0d53 Dec 15 01:27 Harmonics/Readme
[unknown]                  193     370  52.2% -lh5- 6cdb Dec 15 01:27 Harmonics/Readme.info
[unknown]                 2563    9328  27.5% -lh5- 5b4d Dec 15 01:27 Harmonics/Source/audio.c
[unknown]                 1493    3463  43.1% -lh5- 8167 Dec 15 01:27 Harmonics/Source/audio.h
[unknown]                  774    1314  58.9% -lh5- a9d6 Dec 15 01:27 Harmonics/Source/common.c
[unknown]                  901    1579  57.1% -lh5- ec5a Dec 15 01:27 Harmonics/Source/common.h
[unknown]                  516     838  61.6% -lh5- 7a03 Dec 15 01:27 Harmonics/Source/compiler.h
[unknown]                 4192   17627  23.8% -lh5- 955d Dec 15 01:27 Harmonics/Source/guitools.c
[unknown]                 1057    2671  39.6% -lh5- e19c Dec 15 01:27 Harmonics/Source/guitools.h
[unknown]                 1394    3670  38.0% -lh5- fc6d Dec 15 01:27 Harmonics/Source/iff/8SVX.h
[unknown]                  419    1005  41.7% -lh5- 684b Dec 15 01:27 Harmonics/Source/iff/compiler.h
[unknown]                 6973   20481  34.0% -lh5- 3781 Dec 15 01:27 Harmonics/Source/iff/iff.h
[unknown]                 3412   10996  31.0% -lh5- 3c0b Dec 15 01:27 Harmonics/Source/io.c
[unknown]                  762    1528  49.9% -lh5- 651d Dec 15 01:27 Harmonics/Source/io.h
[unknown]                  481    1018  47.2% -lh5- dd24 Dec 15 01:27 Harmonics/Source/lmkfile
[unknown]                 1126    2754  40.9% -lh5- f873 Dec 15 01:27 Harmonics/Source/main.c
[unknown]                  773    1784  43.3% -lh5- d3fa Dec 15 01:27 Harmonics/Source/memory.c
[unknown]                  614    1033  59.4% -lh5- 0c56 Dec 15 01:27 Harmonics/Source/memory.h
[unknown]                 1073    2566  41.8% -lh5- af15 Dec 15 01:27 Harmonics/Source/piano.c
[unknown]                  737    1304  56.5% -lh5- 3412 Dec 15 01:27 Harmonics/Source/piano.h
[unknown]                  266     602  44.2% -lh5- e42c Dec 15 01:27 Harmonics/Source/Resources/Harmonics.info
[unknown]                  108     156  69.2% -lh5- d058 Dec 15 01:27 Harmonics/Source/SCOPTIONS
[unknown]                  480    1025  46.8% -lh5- 0cca Dec 15 01:27 Harmonics/Source/smakefile
[unknown]                  738    1310  56.3% -lh5- fdfa Dec 15 01:27 Harmonics/Source/sprintf.asm
[unknown]                 2419    9404  25.7% -lh5- 6e9c Dec 15 01:27 Harmonics/Source/tool.c
[unknown]                  702    1438  48.8% -lh5- 4623 Dec 15 01:27 Harmonics/Source/tool.h
[unknown]                 6526   23172  28.2% -lh5- 9e66 Dec 15 01:27 Harmonics/Source/ui.c
[unknown]                  844    1743  48.4% -lh5- de21 Dec 15 01:27 Harmonics/Source/ui.h
[unknown]                 1241    2844  43.6% -lh5- 96bb Dec 15 01:27 Harmonics/Source/waveform.c
[unknown]                  638    1097  58.2% -lh5- 4996 Dec 15 01:27 Harmonics/Source/waveform.h
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        42 files   70896  188875  37.5%            Dec 14 18:52

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>