Skip to content

Commit

Permalink
(XT 1.1) Fix various typos (surge-synthesizer#5795)
Browse files Browse the repository at this point in the history
* Fix various typos

Found via `codespell -q 3 -S ./libs -L adres,applys,nd,olt,ontext,pard,parm,ro,ser,tbe,te,whichs,wth`

* Fix clang-formatting requirements

* Re-format after resoving conflicts

Co-authored-by: luz paz <[email protected]>
Co-authored-by: Paul <[email protected]>
  • Loading branch information
3 people authored Jan 22, 2022
1 parent c235556 commit 78210b5
Show file tree
Hide file tree
Showing 78 changed files with 177 additions and 179 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU")
# Any Clang or any GCC
add_compile_options(
-Wno-multichar
# Targetting Windows with GCC/Clang is experimental
# Targeting Windows with GCC/Clang is experimental
$<$<NOT:$<BOOL:${WIN32}>>:-Werror>

# PE/COFF doesn't support visibility
$<$<NOT:$<BOOL:${WIN32}>>:-fvisibility=hidden>
# Inlines visibility is only relevant with C++
$<$<AND:$<NOT:$<BOOL:${WIN32}>>,$<COMPILE_LANGUAGE:CXX>>:-fvisibility-inlines-hidden>

# BP note: If you want to turn on llvm/gcc santize undo this and the link options below
# BP note: If you want to turn on llvm/gcc sanitize undo this and the link options below
# -fsanitize=address -fsanitize=undefined
)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[from our website](https://surge-synthesizer.github.io). Surge Synth Team makes regular releases for all supported
platforms.**

**Over 2021, after the succesful release of Surge 1.9, the Surge Synth team undertook an effort to rebuild Surge in JUCE
**Over 2021, after the successful release of Surge 1.9, the Surge Synth team undertook an effort to rebuild Surge in JUCE
and add a variety of features. This project resulted in the new version of Surge, called 'Surge XT'. The head of this
repo contains the current version of Surge XT. If you are looking to compile a stable production version of Surge, we
tag each release, so if you want to compile Surge 1.9, please check out the `release_1.9.0` tag.**
Expand Down Expand Up @@ -131,7 +131,7 @@ cmake -Bbuild -DBUILD_USING_MY_ASIO_LICENSE=True
On Linux, using a community fork of JUCE, you can build an LV2. Here's how! We assume you have checked out Surge and can
build.

First, clone https://github.com/lv2-porting-project/JUCE/tree/lv2 on branch lv2, to some directory of your chosing.
First, clone https://github.com/lv2-porting-project/JUCE/tree/lv2 on branch lv2, to some directory of your choosing.

```
sudo apt-get install -y lv2-dev
Expand Down
2 changes: 1 addition & 1 deletion doc/Developer Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ CI will fail (`linux-codequality` job). Make sure the diffs you submit for mergi
* `class HaveCamelCaseNames`
* `void functionsAreCamelCaseWithLowerFirst`
* We are not using `s_` or `m_` or equivalent notations for members or statics
* Full namespaces are generally prefered over `using`. We are trying to use
* Full namespaces are generally preferred over `using`. We are trying to use
`std::vector` over `vector` in the code.
* Don't do `using namespace` in header files. Don't `using namespace std` in new code (but it is in some existing code).
* Use namespaces, not classes to group functions. Check out how we implemented `UserInteractions.h`
Expand Down
4 changes: 2 additions & 2 deletions doc/Dynamic Names, Deactivation and Bipolarity.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ associated oscillator using control groups, use that to look up oscillator mode,
understand your parameter index, and return the right name.

Similarly, the `lfoPhaseName` handler which is set up for all LFOs in `SurgePatch.cpp`
creates a static handler and assignes it to all the `start_phase` dynamic
creates a static handler and assigns it to all the `start_phase` dynamic
names to swap Phase and Shuffle text labels based on LFO type.

## Dynamic Activation
Expand Down Expand Up @@ -63,7 +63,7 @@ or null if there is no parent.

So basically, a good implementation of `getValue()` is to look up the parent param and
return its decctivation status, and for `getPrimaryActivationDriver()` to look up the
parent parameter and return a poitner to it. LPG parameteres in EuroTwist do precisely this.
parent parameter and return a pointer to it. LPG parameteres in EuroTwist do precisely this.

### Follow Value Pattern

Expand Down
4 changes: 2 additions & 2 deletions doc/How to Git.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ pattern would be develop on Mac, do a commit, then test it on Windows and Linux.
make a one-line change and commit that. Now your change, which is still "one thing", has two commits.

Or perhaps, you develop your code over a week committing regularly and all those intermediate work commits
aren't ones you want to make visibile. Or perhaps you develop, then format as a last step and have changes.
aren't ones you want to make visible. Or perhaps you develop, then format as a last step and have changes.

In any case, as maintainers, we would sooner have a small number of git commits in our pull requests.

Expand Down Expand Up @@ -208,7 +208,7 @@ paul:~/dev/music/surge$ git cherry -v main
```

Now at this point you could push your branch (`git push origin update-git-howto`) and the PR would update
and would have two commits in it. Continous integration would run its course and voila! But the maintainers would probably
and would have two commits in it. Continuous integration would run its course and voila! But the maintainers would probably
squash those commits and rewrite your commit message, so you may want to squash down to one commit. Here's how you do it.

First rebase interactively with `git rebase -i main`. You will see an editor which looks like this:
Expand Down
2 changes: 1 addition & 1 deletion doc/Surge Architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ of the UI (like those delivered by the host) to be reflected in the UI.

Surge voice allocation and voice stealing code is complicated, supporting multiple polyphony modes
and MPE, which adds substantial complexity. The core data structure is a list of voices
which are allocated at startup and configured with an in-place contructor. Each has a reference
which are allocated at startup and configured with an in-place constructor. Each has a reference
to state for the channel in which it is playing.

The voice class is in `src/common/dsp/SurgeVoice.h` and contains a `SurgeVoiceState`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The basic structure of a surge skin is a directory named "Something.surge-skin" which contains at least a single
file "skin.xml" describing the contents of the skin directory and the desired behaviour of the resulting surge UI.
We call a ".surge-skin" directory and its contents a "skin", "skin bundle" or "bundle" interchangably.
We call a ".surge-skin" directory and its contents a "skin", "skin bundle" or "bundle" interchangeably.
The skin bundle can be placed either in the user's surge documents directory (the location where user patches
are saved, as shown by the 'show user folder' menu item) or in the Surge central data folder if it is a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ There are a couple of key concepts needed to reskin in this simplest fashion
1. All of the controls respond either to colors which are defaulted to the classic skin and can be replaced in this file, or
2. The control has an SVG representation of itself, usually with multiple states
In the first case, Surge has colors with heirarchical names ('lfo.waveform.background', say) which
In the first case, Surge has colors with hierarchical names ('lfo.waveform.background', say) which
are queried by our components at runtime. You can find out each of the names available in the
skin inspector.
Expand Down Expand Up @@ -83,7 +83,7 @@ feel.
</component-classes>
<controls>
<!--[doc]
The default image 'bmp00113' wil be loaded by the scene browser. The `SLIDER_HORIZ_HANDLE`
The default image 'bmp00113' will be loaded by the scene browser. The `SLIDER_HORIZ_HANDLE`
will be loaded by all the sliders. But we need to pick an item to attach the other
image to. We do that here by picking a particular control and replacing the
handle image. This is covered more in Tutorial 04.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defining a group of sliders to all have a different handle.
You could do this by overriding a parameter on a particular control over and over, which we show here, but you
can also do it by defining a user defined control class which allows you to set a bunch of properties then
apply that bundle to a control. This is very very loosely similar to CSS in web design, but don't let that
analogy lead you astray, especially in your optimism for how much we ahve implemented.
analogy lead you astray, especially in your optimism for how much we have implemented.
[doc]-->
<surge-skin name="04 Control Classes and User Controls" category="Tutorials" author="Surge Synth Team" authorURL="https://surge-synth-team.org/" version="2">
Expand All @@ -32,7 +32,7 @@ analogy lead you astray, especially in your optimism for how much we ahve implem
But if we want to replace a collection of sliders and modify several features we don't want
to have to repeat all the configuration. Instead we define a user component class. This class has
a name and a parent class but also advertises properties. Much like CSS these properties cascade
so a control can ovveride them, or a user class can have a user class as a parent. Here we take
so a control can override them, or a user class can have a user class as a parent. Here we take
the simplest approach though of just defining a new slider class which we intend to use for the
LFO H Sliders. We share the parent, CSurgeSlider, and modify the handle_image and the handle_tray
(backdrop) with a custom image.
Expand Down Expand Up @@ -64,7 +64,7 @@ analogy lead you astray, especially in your optimism for how much we ahve implem
<control ui_identifier="lfo.amplitude" class="lfo-hslider"/>

<!--[doc]
And similary we change the prevnext patch button
And similarly we change the prevnext patch button
[doc]-->
<control ui_identifier="controls.patch.prevnext" class="loud-prev-next"/>

Expand Down
2 changes: 1 addition & 1 deletion scripts/installer_linux/make_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pushd ./installer-tmp
# Name of Package
PACKAGE_NAME=surge-xt

# Date in RFC formate for the Changelog
# Date in RFC format for the Changelog
DATE_RFC=`date --rfc-email`
# Date in Day-of-Week Month Day Year format for the rpm config header.
DATE_RPM=`date`
Expand Down
4 changes: 2 additions & 2 deletions scripts/ipy/Demonstrate Surge in Python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"This document assumes that\n",
"1. You basically understand how Surge works as a synth. Concepts like\n",
" scenes, oscilaltors, modulators etc\n",
"2. You can build surge from source succesfully as outlined in the README and\n",
"2. You can build surge from source successfully as outlined in the README and\n",
"3. You can manage a python environment with custom modules\n",
"4. You are running on a machine where the Surge synth is installed (namely\n",
" the factory data directory is present in an OS specific places as described\n",
Expand Down Expand Up @@ -375,7 +375,7 @@
"metadata": {},
"source": [
"Finally, lets define a function which plays surge for about 4 seconds, with\n",
"a key relese at second 3, and returns a smoothed RMS of the output. At this point\n",
"a key release at second 3, and returns a smoothed RMS of the output. At this point\n",
"it should be clear how to do that."
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/pyauto-tests/basics-about-screen.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The simplest use of the accessibility API. Grab a surge xt running instance
# and dump the accesibility heirarchy
# and dump the accessibility hierarchy


import atomacos
Expand Down
2 changes: 1 addition & 1 deletion scripts/pyauto-tests/basics-show-open-menu.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The simplest use of the accessibility API. Grab a surge xt running instance
# and dump the accesibility heirarchy
# and dump the accessibility hierarchy


import atomacos
Expand Down
2 changes: 1 addition & 1 deletion scripts/pyauto-tests/basics-show-tree.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The simplest use of the accessibility API. Grab a surge xt running instance
# and dump the accesibility heirarchy
# and dump the accessibility hierarchy


import atomacos
Expand Down
2 changes: 1 addition & 1 deletion scripts/pyauto-tests/mod-use-menu-buttons.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Show that that the modulation menu properly exposes to accesibility
# Show that that the modulation menu properly exposes to accessibility
# by dumping the menu, muting it, then dumping it again and unmuting it

import sxttest
Expand Down
6 changes: 3 additions & 3 deletions scripts/win/build-win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ build-win.ps1 is a powershell script to control builds and do installs. It takes
-cleanall Clean builds and remove visual studio files
-build Build
-install Install vst2 and 3. Will prompt for permissions
-bi buid + install
-bi build + install
-cb clean + build
-cbi clean + build + install
-w32 Build 32 bit
It does not run premake yet.
It does not run premake yet.
You need to onetime do
Set-ExecutionPolicy -scope CurrentUser RemoteSigned
Set-ExecutionPolicy -scope CurrentUser RemoteSigned
to use this.
"@
Expand Down
4 changes: 2 additions & 2 deletions scripts/wt-tool/generated-wt.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def npftoi15bin(fsamples):

def generatewt(filename, genf, res, tables):
"""Given res as a function of npline,int -> npline to generate the nth table,
genereate the wt file"""
generate the wt file"""
line = np.linspace(0, 1, res, endpoint=False)
dat = []
for i in range(tables):
Expand All @@ -76,7 +76,7 @@ def comparewt(fn1, fn2):
l2 = np.linspace(0, 1, len(d2[0]), endpoint=False)

if(len(d1) != len(d2)):
print(" Lenghts don't match", len(d1), " ", len(d2))
print(" Lengths don't match", len(d1), " ", len(d2))
return

for i in range(len(d1)):
Expand Down
2 changes: 1 addition & 1 deletion scripts/wt-tool/wt-tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def main():
parser.add_option("-f", "--file", dest="file",
help="wt_file being inspected or created", metavar="FILE")
parser.add_option("-d", "--wav_dir", dest="wav_dir",
help="Directory containing or recieving wav files for wt", metavar="DIR")
help="Directory containing or receiving wav files for wt", metavar="DIR")
parser.add_option("-n", "--normalize", dest="normalize", default="none", metavar="MODE",
help="""(Create only) how to normalize input.
Modes are 'none' leave input untouched;
Expand Down
2 changes: 1 addition & 1 deletion src/common/DebugHelpers.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
** DebugHelpers.h
**
** Cotnains debug APIs. Do not use them in production code.
** Contains debug APIs. Do not use them in production code.
** Pull requests with references to these functions will not be merged!
**
*/
Expand Down
2 changes: 1 addition & 1 deletion src/common/FilterConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* right choice, but when you curse me for the odd name list, you can come back and read this
* comment and feel slightly better. Finally, items which split and changed meaning got a new name
* (so fut_comb is now fut_comb_pos and fut_comb_neg, say), which requires us to go and fix up any
* code which refered to the old values.
* code which referred to the old values.
*/

enum fu_type_sv14
Expand Down
2 changes: 1 addition & 1 deletion src/common/LuaSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bool parseStringDefiningFunction(lua_State *s, const std::string &definition,
* top of the stack, bar next and hootie third.
*
* Return an integer which is the number of the functions which were resolved and
* the number which were nil. If the function returns 0 errorMessage will be popuplated
* the number which were nil. If the function returns 0 errorMessage will be populated
* with something.
*/
int parseStringDefiningMultipleFunctions(lua_State *s, const std::string &definition,
Expand Down
2 changes: 1 addition & 1 deletion src/common/Parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2554,7 +2554,7 @@ void Parameter::get_display_of_modulation_depth(char *txt, float modulationDepth
return;
}
float mf = modulationDepth;
// OK so this is already handed to us extended and this one is wierd so
// OK so this is already handed to us extended and this one is weird so
auto qq = mf;
if (extend_range)
{
Expand Down
4 changes: 2 additions & 2 deletions src/common/Parameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ struct ParameterDynamicDeactivationFunction : public ParameterDynamicBoolFunctio

/*
** It used to be parameters were assigned IDs in SurgePatch using an int which we ++ed along the
** way. If we want to 'add at the end' but 'cluster together' we need a different data strcture
** way. If we want to 'add at the end' but 'cluster together' we need a different data structure
** to allow clusters of parameters, so instead make SurgePatch use a linked list (or multiple lists)
** while constructing params and then resolve them all at the end. This little class lets us
** do that.
Expand Down Expand Up @@ -447,7 +447,7 @@ class Parameter

pdata val{}, val_default{}, val_min{}, val_max{};
// You might be tempted to use a non-fixed-size member here, like a std::string, but
// this class gets pre-c++ memcopied so thats not an option which is why I do this wonky
// this class gets pre-c++ memcopied so that's not an option which is why I do this wonky
// pointer thing and strncpy from a string onto ui_identifier
ParameterIDCounter::promise_ptr_t id_promise{};
int id{};
Expand Down
8 changes: 4 additions & 4 deletions src/common/PatchDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ struct TxnGuard

struct PatchDB::WriterWorker
{
static constexpr const char *schema_version = "11"; // I will rebuild if this is not my verion
static constexpr const char *schema_version = "11"; // I will rebuild if this is not my version

// language=SQL
static constexpr const char *setup_sql = R"SQL(
Expand Down Expand Up @@ -356,7 +356,7 @@ CREATE TABLE IF NOT EXISTS Favorites (
if (ec != SQLITE_OK)
{
std::ostringstream oss;
oss << "An error occured opening sqlite file '" << dbname << "'. The error was '"
oss << "An error occurred opening sqlite file '" << dbname << "'. The error was '"
<< sqlite3_errmsg(dbh) << "'.";
storage->reportError(oss.str(), "Surge Patch Database Error");
if (dbh)
Expand Down Expand Up @@ -495,7 +495,7 @@ CREATE TABLE IF NOT EXISTS Favorites (
}
}

// FIXME features shuld be an enum or something
// FIXME features should be an enum or something

enum FeatureType
{
Expand Down Expand Up @@ -1030,7 +1030,7 @@ CREATE TABLE IF NOT EXISTS Favorites (
if (notifyOnError)
{
std::ostringstream oss;
oss << "An error occured opening r/o sqlite file '" << dbname
oss << "An error occurred opening r/o sqlite file '" << dbname
<< "'. The error was '" << sqlite3_errmsg(dbh) << "'.";
storage->reportError(oss.str(), "Surge Patch Database Error");
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/PatchDBQueryParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace pegtl = tao::TAO_PEGTL_NAMESPACE;

namespace grammar
{
// CLang Format wants all these emtpy structs to be braced on newlines so turn it off for now
// CLang Format wants all these empty structs to be braced on newlines so turn it off for now
// clang-format off
struct expression;
struct value;
Expand Down
10 changes: 5 additions & 5 deletions src/common/SkinModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* and we want that default to be completely over-rideable in our VSTGUI
* implementation.
*
* And finally, we don't want the core of surge to refernce VSTGUI.
* And finally, we don't want the core of surge to reference VSTGUI.
*
* So that gets us the following set of collaborations
*
Expand Down Expand Up @@ -77,7 +77,7 @@
* 2. Have the data (but not the renderer) for the layout information in src/common
*
* I chose #2 mostly because #1 is especially tedious since a collection of parameters
* share a skin identity. For instance, all of the oscilator pitch sliders (of which there
* share a skin identity. For instance, all of the oscillator pitch sliders (of which there
* are 6 as of 1.8.0) are a single point of skin identity. Thus attaching them to skin
* data models in SurgePatch makes sense.
*
Expand Down Expand Up @@ -111,7 +111,7 @@ struct Component
/*
* We could have done something much clevere with templates and per-class enums
* but decided not to. Instead here is an enum which is the union of all possible
* properites that an item can have.
* properties that an item can have.
*/
enum Properties
{
Expand All @@ -123,7 +123,7 @@ struct Component
BACKGROUND,
HOVER_IMAGE,
HOVER_ON_IMAGE,
IMAGE, // Note for most components "image" binds to "background" but some have it seprate
IMAGE, // Note for most components "image" binds to "background" but some have it separate

ROWS,
COLUMNS,
Expand Down Expand Up @@ -184,7 +184,7 @@ struct Component
std::shared_ptr<Payload> payload;

/*
* To allow aliasing and backwards compatability, a property binds to the skin engine
* To allow aliasing and backwards compatibility, a property binds to the skin engine
* with multiple names for a given class.
*/
Component &withProperty(Properties p, const std::initializer_list<std::string> &names,
Expand Down
2 changes: 1 addition & 1 deletion src/common/SurgePatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ void SurgePatch::load_xml(const void *data, int datasize, bool is_preset)
}
else
{
// Explicity set scene to A. See #2285
// Explicitly set scene to A. See #2285
t.source_scene = 0;
}
}
Expand Down
Loading

0 comments on commit 78210b5

Please sign in to comment.