liveBook · Manning

Duty cycle

As explained in Learn Haskell by Example

A duty cycle is the fraction of each period during which a pulse signal remains in its high or low state.

A duty cycle is the fraction of each period that a pulse signal remains high or low. It changes the sound characteristics of a pulse wave. section 10.1.2

A square wave

A square wave has a 50% duty cycle: the signal stays low for the same amount of time that it stays high. section 10.1.2

Use duty cycle when designing pulse-based audio:

  • Treat 50% as the balanced square-wave case. section 10.1.2
  • Experiment with adjustable values to create a generic pulse waveform and explore changing sound characteristics. section 10.1.2

How Learn Haskell by Example covers it

How deep it goes
Defines the 50% case and assigns adjustable pulse-wave implementation as an exercise without supplying its completed implementation.
Examples
Uses a square wave with equal high and low durations and an exercise requesting a generic adjustable pulse waveform.
What you can do after
Practice/perform implementing a generic pulse waveform with an adjustable duty cycle.
How it connects
Connects duty cycle with pulse waves, square waves, waveforms, oscillators, signals, frequency, and musical sound.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Haskell by Example. The section links point to the parts of the book it draws on.