Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c942012
roughly added work done in the tutorial, changes should be applied to…
Maxw3llGM May 30, 2023
927b546
First Push to the new repo
Maxw3llGM Jul 17, 2023
7a6316a
added the rest of the tutorials, must add text and modify the panels …
Maxw3llGM Jul 28, 2023
0b5b147
combined tutorials 2 and 3 as they were redundant
Maxw3llGM Aug 8, 2023
285f00d
Added the content for Tutorial 2
Maxw3llGM Sep 1, 2023
0730d69
Updated the Home page
Maxw3llGM Sep 1, 2023
4a4a4b4
updated name on intro
Maxw3llGM Sep 1, 2023
8f3ed37
added delta modulation initial
wolffeparke Feb 8, 2024
f7b2caf
fixed formating of delta modualtion text
Maxw3llGM Feb 8, 2024
7460ab6
Second pass at delta modulation, added reconstruction panel/sound but…
wolffeparke Feb 10, 2024
ccf6e40
Finalized Delta modulation page, with adaptive delta modulation. Fixe…
wolffeparke Feb 21, 2024
75a2752
Many (MANY) changes. Both sampling methods are now available at the s…
wolffeparke Apr 2, 2024
34fdf9c
Added the chapter for delta modulation, and expanded the earlier chap…
wolffeparke Apr 2, 2024
520d3b6
Added documentation for adding new pages
wolffeparke Apr 18, 2024
adc2878
Merge pull request #2 from IDMIL/delta_modulation
Maxw3llGM May 23, 2024
966efb2
Update index.html
Maxw3llGM May 23, 2024
86e3abd
modified the main page
Maxw3llGM May 23, 2024
45d1b55
Update index.html
mmwanderley2 Apr 13, 2025
6909bcb
copy readme to waves
ArdenButterfield Sep 15, 2025
82d6d03
gitignore .idea
ArdenButterfield Sep 15, 2025
9364c75
add triangluar and gaussian dither options
ArdenButterfield Sep 15, 2025
c2175d7
prefilter waveform
ArdenButterfield Sep 16, 2025
7d716bc
capitalization on classes
ArdenButterfield Sep 16, 2025
8b1ca77
typo
ArdenButterfield Sep 16, 2025
c854e38
dither historgram
ArdenButterfield Sep 18, 2025
f7054c3
reconstructed delay
ArdenButterfield Sep 19, 2025
ecfb304
lots of refactoring
ArdenButterfield Sep 19, 2025
5413515
new slider options for audio inputs
ArdenButterfield Sep 21, 2025
610130c
play preloaded wav files
ArdenButterfield Sep 21, 2025
6ec31a6
vowel formants
ArdenButterfield Sep 25, 2025
12cf409
begin rewrite of widget to use separate canvas for each panel/slider
ArdenButterfield Oct 2, 2025
e5c2731
sliders and panels as separate canvasses
ArdenButterfield Oct 3, 2025
8042234
filter kernel time domain
ArdenButterfield Oct 20, 2025
d25436b
filter graphs
ArdenButterfield Oct 20, 2025
792b5a4
collapse buttons
ArdenButterfield Oct 20, 2025
68d80cd
putting functions in classes
ArdenButterfield Oct 20, 2025
1afe95c
slider arrangement
ArdenButterfield Oct 21, 2025
9ea8119
refactoring buffers
ArdenButterfield Oct 26, 2025
99c4b62
put code into functions
ArdenButterfield Oct 26, 2025
c447fba
working on play function
ArdenButterfield Oct 27, 2025
d62b6da
panel layouts
ArdenButterfield Nov 3, 2025
496e2d6
bug fixes
ArdenButterfield Nov 18, 2025
a62f71a
prevent aliasing on input
ArdenButterfield Nov 18, 2025
f2f4f01
gaussian dither
ArdenButterfield Nov 18, 2025
4796302
reformat
ArdenButterfield Nov 18, 2025
d4d74cf
amplitude slider
ArdenButterfield Nov 18, 2025
85b796c
collapse button symbol
ArdenButterfield Nov 24, 2025
a3de40d
update p5 version
ArdenButterfield Nov 24, 2025
68d2cea
anti-imaging filter order
ArdenButterfield Nov 25, 2025
131f25a
css
ArdenButterfield Nov 25, 2025
9696688
try supporting separate page for delta sigma
ArdenButterfield Nov 26, 2025
615f6a9
start delta sigma page
ArdenButterfield Nov 26, 2025
22cd019
bug fixes on reconstruction filter
ArdenButterfield Nov 27, 2025
6736d00
a couple more fixes
ArdenButterfield Nov 27, 2025
17628a9
time and amp zoom sliders, names
ArdenButterfield Dec 7, 2025
87d3028
bring changes over to dsig as well
ArdenButterfield Dec 7, 2025
a1fcb1a
code efficiency improvements
ArdenButterfield Dec 8, 2025
5c68eb2
refactor repaint function
ArdenButterfield Dec 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
README.md.backup
.idea
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ function renderWavesImpl(settings, fft, p) { return (playback = false) => {
else if (settings.harmSlope == "1/x") harmonic_amplitude = 1/harmonic_number;
else if (settings.harmSlope == "1/x2") harmonic_amplitude = 1/harmonic_number/harmonic_number;
else if (settings.harmSlope == "flat") harmonic_amplitude = 1;
else if (settings.harmSlope == "log") {harmonic_amplitude = Math.exp(-0.1*(harmonic_number-1));
console.log(harmonic_amplitude)}

// In case the harmonic slope is 1/x^2 and the harmonic type is "odd",
// by inverting every other harmonic we generate a nice triangle wave.
Expand Down Expand Up @@ -293,7 +295,7 @@ function renderWavesImpl(settings, fft, p) { return (playback = false) => {

// specify filter parameters; as before, the cutoff is set to the Nyquist
var filterCoeffs = firCalculator.lowpass(
{ order: 200
{ order: 1500
, Fs: WEBAUDIO_MAX_SAMPLERATE
, Fc: (WEBAUDIO_MAX_SAMPLERATE / settings.downsamplingFactor) / 2
});
Expand Down
177 changes: 141 additions & 36 deletions all-panels/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,149 @@
<script src="../fft.js"></script>
<script src="../waves.js"></script>
<script src="../widget.js"></script>
<script src="../interaction.js"></script>
<title>Digital Audio Workbench</title>
</head>
<body>
<body>
<main>
<script>
const widget = new_widget(
[ new inputSigPanel()
, new inputSigFreqPanel()
, new impulsePanel()
, new impulseFreqPanel()
, new sampledInputPanel()
, new sampledInputFreqPanel()
, new quantNoisePanel()
, new quantNoiseFFTPanel()
, new reconstructedSigPanel()
, new reconstructedSigFFTPanel()
, new inputPlusSampledPanel()
, new allSignalsPanel()
],
[ new freqSlider()
, new numHarmSlider()
, new sampleRateSlider()
, new antialiasingSlider()
, new ditherSlider()
, new bitDepthSlider()
, new amplitudeSlider()
, new phaseSlider()
, new ampZoomSlider()
, new freqZoomSlider()
, new timeZoomSlider()
]
);
</script>
<div class="timeline">

<h1>Digital Audio Workbench (Sampling and Quantization)</h1>

<h2>By Arden Butterfield, Josh Rohs, Travis J. West & Marcelo M. Wanderley
with contributions by Eduardo Meneses, Christian Frisson, Erivan Duarte, Laurent Tarabout, and Maxwell Gentili-Morin</h2>
<h3>Copyright IDMIL/McGill University, 2025</h3>

<div class="section" id="input-section">
<div class="titlebar">
<div class="section-title">
<h2>Input</h2>
</div>
<button class="collapse-button" id="coll-input" onclick="collapseClick(this.id)"></button>
</div>
<div class="collapse">
<div class="row panels">
<div class="panel" id="input-time-domain"></div>
<div class="panel" id="input-freq-domain"></div>
</div>
<div class="row sliders">
<div class="slider" id="audio-input-type-slider"></div>
<div class="slider" id="frequency-slider"></div>
<div class="slider" id="num-harmonics-slider"></div>
<div class="slider" id="amplitude-slider"></div>
</div>
<button class="play-button" id="play-input">Play</button>
</div>
</div>
<div class="section" id="filter-section">
<div class="titlebar">
<div class="section-title">
<h2>Filter</h2>
</div>
<button class="collapse-button" id="coll-filter" onclick="collapseClick(this.id)"></button>
</div>
<div class="collapse">
<div class="row panels">
<div class="panel" id="filter-kernel"></div>
<div class="panel" id="filter-kernel-fft"></div>
</div>
<div class="row panels">
<div class="panel" id="input-filtered-time-domain"></div>
<div class="panel" id="input-filtered-freq-domain"></div>
</div>
<div class="row sliders">
<div class="slider" id="antialiasing-filter-order-slider"></div>
</div>
<button class="play-button" id="play-filter-kernel">Play kernel</button>
<button class="play-button" id="play-filtered-input">Play filtered input</button>
</div>
</div>
<div class="section" id="samplerate-section">
<div class="titlebar">
<div class="section-title">
<h2>Sample Rate</h2>
</div>
<button class="collapse-button" id="coll-fs" onclick="collapseClick(this.id)"></button>
</div>
<div class="collapse">
<div class="row panels">
<div class="panel" id="input-plus-sampled"></div>
<div class="panel" id="sampling-freq-domain"></div>
</div>
<div class="row sliders">
<div class="slider" id="sample-rate-slider"></div>
</div>
<button class="play-button" id="play-sample-rate">Play</button>
</div>
</div>
<div class="section" id="dither-section">
<div class="titlebar">
<div class="section-title">
<h2>Dither</h2>
</div>
<button class="collapse-button" id="coll-dither" onclick="collapseClick(this.id)"></button>

</div>
<div class="collapse">
<div class="row panels">
<div class="panel" id="dither-histogram"></div>
</div>
<div class="row sliders">
<div class="slider" id="dither-slider"></div>
</div>
</div>
</div>
<div class="section" id="quantization-section">
<div class="titlebar">
<div class="section-title">
<h2>Quantization</h2>
</div>
<button class="collapse-button" id="coll-quantization" onclick="collapseClick(this.id)"></button>
</div>
<div class="collapse">
<div class="row panels">
<div class="panel" id="quantization-noise"></div>
<div class="panel" id="quantization-noise-fft"></div>
</div>
<div class="row sliders">
<div class="slider" id="quantization-slider"></div>
</div>
<button class="play-button" id="play-quantized-noise">Play</button>
</div>
</div>
<div class="section" id="reconstructed-section">
<div class="titlebar">
<div class="section-title">
<h2>Reconstructed</h2>
</div>
<button class="collapse-button" id="coll-recon" onclick="collapseClick(this.id)"></button>

</div>
<div class="collapse">
<div class="row panels">
<div class="panel" id="reconstructed"></div>
<div class="panel" id="reconstructed-fft"></div>
</div>
<div class="row panels">
<div class="panel" id="all-signals"></div>
</div>
<div class="row sliders">
<div class="slider" id="reconstruction-filter-order-slider"></div>
</div>
<button class="play-button" id="play-reconstructed">Play Reconstructed</button>
</div>
</div>
</div>
</main>
<footer>
<div>Digital Audio Workbench </div>
<div>By Josh Rohs, Travis J. West & Marcelo M. Wanderley </div>
<div>with contributions by Eduardo Meneses, Christian Frisson, and Erivan Duarte</div>
<div>Copyright <a href="//www-new.idmil.org/">IDMIL</a>/McGill University, 2020 </div>
</footer>
<div class="global-panel">
<div id="global-panel-collapse-button" onclick="collapseGlobalPanel()"></div>
<div class="contents">
<div class="slider" id="time-zoom-slider"></div>
<div class="slider" id="amp-zoom-slider"></div>
</div>
</div>
<script>
createWidgets();
</script>
</body>
</html>
105 changes: 105 additions & 0 deletions delta-modulation/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="styles_delta.css" media="screen" />
<!-- p5.js begin -->
<!-- 1) use p5.min.js for optimizing size/transfer -->
<script src="../p5.min.js"></script>
<!-- 2) use p5.js for debugging -->
<!-- <script src="../p5.js"></script> -->
<!-- p5.js end-->
<script src="../fili.min.js"></script>
<script src="panel_delta.js"></script>
<script src="slider_delta.js"></script>
<script src="../fft.js"></script>
<script src="waves_delta.js"></script>
<script src="widget_delta.js"></script>
<script src="pages.js"></script>

</head>
<body>
<div id="page-container">
<center>
<div class="tab">
<!--<a id="prevButton" class="button_round">&laquo; Prev </a>-->
<a href="../index.html" class="button_round">Home </a>
<!--<a id="nextButton" class="button_round">Next &raquo;</a>-->
</div>
<div class="tabs">
<button class="button_round" onclick="samplingSection(event, 'Question')" id="defaultOpen">Question</button>

</div>
</center>
<!--<div id = "content-wrap" class="title qs">
<H1>
Waveforms
</H1>
<hr>
<p id = "main page">
Leave blank
</p>
</div>-->
<div id="Question" class="tabcontent active">
<main>
<script>
widgetset = new_widget(
[ new inputSigPanel()
],
[ new freqSlider()
, new timeZoomSlider()
]
, ["original"]
,"Question"
,"qs"
, 120
)
</script>
<br>
</main>
</div>
<div id="Answer" class="tabcontent">
</div>


<script>
function samplingSection(evt, cityName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("button_round");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " active";
}

// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();
var paragraph = document.getElementById("main page");
var initialPageNum = 0;
var pageNum = 0;

// Add event listener to the Next/Previous button
document.getElementById("nextButton").addEventListener("click", nextPage);
document.getElementById("prevButton").addEventListener("click", prevPage);

function questionlist(evt, questions) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tab_questions_content");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("ques");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(questions).style.display = "block";
evt.currentTarget.className += " active";
}
// document.getElementById("defaulthover").click();
</script>
</body>
</html>
Loading