AminetAminet
Search:
82461 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.2
Architecture:m68k-amigaos
Date:2018-09-06
Download:http://aminet.net/mus/edit/harmonics.lha - View contents
Readme:http://aminet.net/mus/edit/harmonics.readme
Downloads:627
New in version 1.2

- Minor fixes and tweaks


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.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 Sep  6 13:24 Harmonics.info
[unknown]                  335     894  37.5% -lh5- e61e Sep  6 13:24 Harmonics/Examples.info
[unknown]                   14      24  58.3% -lh5- b5ae Sep  6 13:24 Harmonics/Examples/Church
[unknown]                  246     368  66.8% -lh5- 20ef Sep  6 13:24 Harmonics/Examples/Church.info
[unknown]                   24      24 100.0% -lh0- 14b5 Sep  6 13:24 Harmonics/Examples/Sawtooth
[unknown]                  248     368  67.4% -lh5- 5382 Sep  6 13:24 Harmonics/Examples/Sawtooth.info
[unknown]                   24      24 100.0% -lh0- ae0f Sep  6 13:24 Harmonics/Examples/Square
[unknown]                  228     350  65.1% -lh5- 4e64 Sep  6 13:24 Harmonics/Examples/Square.info
[unknown]                12641   35147  36.0% -lh5- 7994 Sep  6 13:24 Harmonics/gpl-3.0.txt
[unknown]                  190     370  51.4% -lh5- 7b95 Sep  6 13:24 Harmonics/gpl-3.0.txt.info
[unknown]                10522   16480  63.8% -lh5- 3f5f Sep  6 13:24 Harmonics/Harmonics
[unknown]                  266     602  44.2% -lh5- e42c Sep  6 13:24 Harmonics/Harmonics.info
[unknown]                 2307    4956  46.5% -lh5- 4cb4 Sep  6 13:24 Harmonics/Readme
[unknown]                  193     370  52.2% -lh5- 6cdb Sep  6 13:24 Harmonics/Readme.info
[unknown]                 2554    9321  27.4% -lh5- 3a3f Sep  6 13:24 Harmonics/Source/audio.c
[unknown]                 1487    3456  43.0% -lh5- 8c16 Sep  6 13:24 Harmonics/Source/audio.h
[unknown]                  768    1307  58.8% -lh5- e19f Sep  6 13:24 Harmonics/Source/common.c
[unknown]                  834    1426  58.5% -lh5- b305 Sep  6 13:24 Harmonics/Source/common.h
[unknown]                  510     831  61.4% -lh5- 43f2 Sep  6 13:24 Harmonics/Source/compiler.h
[unknown]                 4187   17624  23.8% -lh5- 91f7 Sep  6 13:24 Harmonics/Source/guitools.c
[unknown]                 1051    2664  39.5% -lh5- 4e4a Sep  6 13:24 Harmonics/Source/guitools.h
[unknown]                 1394    3670  38.0% -lh5- fc6d Sep  6 13:24 Harmonics/Source/iff/8SVX.h
[unknown]                  419    1005  41.7% -lh5- 684b Sep  6 13:24 Harmonics/Source/iff/compiler.h
[unknown]                 6973   20481  34.0% -lh5- 3781 Sep  6 13:24 Harmonics/Source/iff/iff.h
[unknown]                 3403   10989  31.0% -lh5- f3b8 Sep  6 13:24 Harmonics/Source/io.c
[unknown]                  757    1521  49.8% -lh5- 51e8 Sep  6 13:24 Harmonics/Source/io.h
[unknown]                  480    1010  47.5% -lh5- 941b Sep  6 13:24 Harmonics/Source/lmkfile
[unknown]                 1078    2677  40.3% -lh5- 1541 Sep  6 13:24 Harmonics/Source/main.c
[unknown]                  767    1777  43.2% -lh5- 567d Sep  6 13:24 Harmonics/Source/memory.c
[unknown]                  608    1026  59.3% -lh5- da11 Sep  6 13:24 Harmonics/Source/memory.h
[unknown]                 1072    2578  41.6% -lh5- 1268 Sep  6 13:24 Harmonics/Source/piano.c
[unknown]                  726    1278  56.8% -lh5- 7e13 Sep  6 13:24 Harmonics/Source/piano.h
[unknown]                  266     602  44.2% -lh5- e42c Sep  6 13:24 Harmonics/Source/Resources/Harmonics.info
[unknown]                  108     156  69.2% -lh5- d058 Sep  6 13:24 Harmonics/Source/SCOPTIONS
[unknown]                  479    1017  47.1% -lh5- 3c6e Sep  6 13:24 Harmonics/Source/smakefile
[unknown]                  291     511  56.9% -lh5- 364e Sep  6 13:24 Harmonics/Source/sprintf.asm
[unknown]                 2444    9443  25.9% -lh5- 7789 Sep  6 13:24 Harmonics/Source/tool.c
[unknown]                  693    1431  48.4% -lh5- 4ed6 Sep  6 13:24 Harmonics/Source/tool.h
[unknown]                 6296   22613  27.8% -lh5- b81b Sep  6 13:24 Harmonics/Source/ui.c
[unknown]                  837    1736  48.2% -lh5- 8c24 Sep  6 13:24 Harmonics/Source/ui.h
[unknown]                 1235    2837  43.5% -lh5- 970f Sep  6 13:24 Harmonics/Source/waveform.c
[unknown]                  629    1090  57.7% -lh5- de90 Sep  6 13:24 Harmonics/Source/waveform.h
---------- ----------- ------- ------- ------ ---------- ------------ ----------
 Total        42 files   69928  186954  37.4%            Sep  6 17:23

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