Skip to content

Instantly share code, notes, and snippets.

@yenrab
yenrab / pure_tone.swift
Last active November 14, 2022 17:33
An MIT licensed pure tone generator in Swift. A single function is provided with internal comments. Complexity calculation is not done, but is at least O(n) with the duration being the data.
//
//
// Swift Pure Tone Generation
//
/*
Copyright (c) 2021 Lee Barney
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense,