ltc-reader 1.0.0__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. ltc_reader-1.0.2/PKG-INFO +174 -0
  2. ltc_reader-1.0.2/README.md +164 -0
  3. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/_version.py +2 -2
  4. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/pyproject.toml +2 -2
  5. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/src/ltc_reader/Channel.py +2 -2
  6. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/exception/ExceptionContainer.py +1 -1
  7. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/AbstractImmutableList.py +1 -1
  8. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/AbstractPermutations.py +3 -3
  9. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/FixedList.py +1 -1
  10. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/JoinedList.py +2 -2
  11. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/ListWithRemove.py +2 -2
  12. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/MapList.py +2 -2
  13. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/MapThreadList.py +2 -2
  14. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/Outer.py +3 -3
  15. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/Permutations.py +1 -1
  16. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/PermutationsOrderedWithoutReturn.py +3 -3
  17. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/PermutationsWithReturn.py +3 -3
  18. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/PermutationsWithoutReturn.py +4 -4
  19. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/PowerSet.py +3 -3
  20. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/Range.py +1 -1
  21. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/Repeat.py +2 -2
  22. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/SubList.py +2 -2
  23. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/Tuples.py +3 -3
  24. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/listener/DefaultListenable.py +2 -2
  25. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/listener/Listenable.py +1 -1
  26. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/queue.py +1 -1
  27. ltc_reader-1.0.0/PKG-INFO +0 -55
  28. ltc_reader-1.0.0/README.md +0 -45
  29. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/.gitignore +0 -0
  30. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/LICENSE +0 -0
  31. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/src/ltc_reader/LTCFrame.py +0 -0
  32. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/src/ltc_reader/LTCMap.py +0 -0
  33. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/src/ltc_reader/__init__.py +0 -0
  34. {ltc_reader-1.0.0 → ltc_reader-1.0.2}/src/ltc_reader/py.typed +0 -0
  35. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/__init__.py +0 -0
  36. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/py.typed +0 -0
  37. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/__init__.py +0 -0
  38. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/exception/__init__.py +0 -0
  39. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/ArrayListSet.py +0 -0
  40. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/ImmutableList.py +0 -0
  41. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/Tuple.py +0 -0
  42. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/__init__.py +0 -0
  43. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/immutablelist/py.typed +0 -0
  44. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/listener/Listener.py +0 -0
  45. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/listener/__init__.py +0 -0
  46. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/listener/py.typed +0 -0
  47. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/repository/NoResourcesNowException.py +0 -0
  48. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/repository/__init__.py +0 -0
  49. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/Iterator.py +0 -0
  50. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/__init__.py +0 -0
  51. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/atomic.py +0 -0
  52. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/calc.py +0 -0
  53. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/classloader.py +0 -0
  54. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/comparator.py +0 -0
  55. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/dictkeys.py +0 -0
  56. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/enum.py +0 -0
  57. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/py.typed +0 -0
  58. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/safehash.py +0 -0
  59. {ltc_reader-1.0.0/src → ltc_reader-1.0.2/src/ltc_reader}/tudelft/utilities/tools/systemproperties.py +0 -0
@@ -0,0 +1,174 @@
1
+ Metadata-Version: 2.4
2
+ Name: ltc-reader
3
+ Version: 1.0.2
4
+ Summary: Python ltc reader.
5
+ Project-URL: Homepage, https://gitlab.ewi.tudelft.nl/capturelab/py-ltc-reader
6
+ Author-email: REIT <reit-ewi@tudelft.nl>
7
+ License-File: LICENSE
8
+ Requires-Python: >=3.9
9
+ Description-Content-Type: text/markdown
10
+
11
+ # ltc-reader
12
+
13
+ Python ltc reader.
14
+
15
+ [[_TOC_]]
16
+
17
+
18
+ ## A generic basic LTC decoder
19
+
20
+ LTC stands for Linear Timecode and is a signal used in media production to
21
+ time synchronize multiple sources of audio and video involved in same production.
22
+
23
+ LTC is an analog audio signal and because of it can be easily transmitted
24
+ among stations and added as an audio channel with other audio and video.
25
+
26
+
27
+ ## Usage
28
+
29
+ The test code in LTCMapTest shows how to use this:
30
+
31
+ ```
32
+ with wave.open("tests/Audio_2.wav") as wav_file:
33
+ metadata = wav_file.getparams()
34
+ if metadata.nchannels != 1:
35
+ raise ValueError("1-channel data required") # noqa: EM101
36
+ # frames = wav_file.readframes(metadata.nframes)
37
+ data: bytes = wav_file.readframes(metadata.nframes)
38
+ chan: Channel = ByteChannel(data, metadata.framerate, metadata.sampwidth, "little", None)
39
+
40
+ map: LTCMap = LTCMap.fromChannel(chan)
41
+ print(map)
42
+
43
+ ```
44
+
45
+ Most lines are just fetching your audio from a file and extracting the data, sample rate, data width etc. You can change this with other code to read your favourite encoding (eg mp3 , aiff, flac, etc). The decoded data is then put into the Channel object and that is used to create the LTCMap. The Channel ensures the audio is 1-channel with float samples, and ensures there is a ```get``` method to get the Nth sample in the audio.
46
+
47
+ The example uses an ByteChannel, which assumes your data consists of a list of samples
48
+ and each sample is a fixed number of bytes in little or big endian form.
49
+ If your data has a different behaviour, you can implement your own Channel
50
+ to map map/adapt to the required form. Your data doesn't even have to be in memory for that.
51
+
52
+ The LTCMap processes all the Channel samples and finds all the LTCs contained.
53
+ This map can be accessed through the ```getMap``` method.
54
+ This map contains all sample positions (int) and the extracted LTCFrame data.
55
+ The sample position is the first sample of the LTC code in the channel.
56
+
57
+
58
+
59
+ NOTE
60
+ This contains hard copy of tudelft.utilities 1.1.6 from https://gitlab.ewi.tudelft.nl/interactive-intelligence/utilities/utilitiespy
61
+
62
+
63
+ ## Installation
64
+
65
+
66
+ 1. Install [uv](https://docs.astral.sh/uv/):
67
+
68
+ 2. Install the dependencies, including the dev dependencies
69
+
70
+ ```bash
71
+ uv sync
72
+ ```
73
+ or install only the runtime dependencies
74
+
75
+ ```bash
76
+ uv sync --no-dev
77
+ ```
78
+
79
+ 3. Install the prek hook.
80
+ This will set up prek to run the checks automatically on your files before you commit them.
81
+
82
+ ```bash
83
+ uv run prek install
84
+ ```
85
+
86
+ **Remember that if the prek checks fail, you can always commit by skipping the checks with `git commit --no-verify`**
87
+
88
+
89
+ ## Running tests
90
+
91
+ Run your tests with
92
+
93
+ ```bash
94
+ uv run pytest --cov=src ./tests
95
+ ```
96
+
97
+ ## Formatting and checking
98
+
99
+ The tools for formatting and linting your code for errors are all bundled with [prek](https://prek.j178.dev). Included are:
100
+ - [ruff](https://astral.sh/ruff) - linting and formatting
101
+ - [yamlfix](https://github.com/lyz-code/yamlfix) - linting and formatting for .yaml files
102
+ - various other small fixes and checks (see the [`.pre-commit-config.yaml`](.pre-commit-config.yaml) file for more information)
103
+
104
+ It's possible that prek will make changes to your files when it runs the checks, so you should add those changes to your commit before you commit your code. A typical workflow would look like this:
105
+
106
+ ```bash
107
+ git add -u
108
+ git commit -m "My commit message"
109
+ # prek will run the checks here; if it makes changes, you'll need to add them to your commit
110
+ git add -u
111
+ git commit -m "My commit message"
112
+ # changes should have all been made by now and the commit should pass if there are no other issues
113
+ # if your commit fails again here, you have to fix the issues manually (not everything can be fixed automatically).
114
+ ```
115
+
116
+ One thing that is worth knowing is how to lint your files outside of the context of a commit. You can run the checks manually by running the following command:
117
+
118
+ ```bash
119
+ uv run prek run --all-files
120
+ ```
121
+
122
+ This will run the checks on all files in your git project, regardless of whether they're staged for commit or not.
123
+
124
+ ## Documentation
125
+
126
+ Generate the documentation locally with
127
+
128
+ ```bash
129
+ uv run zensical serve
130
+ ```
131
+
132
+ ## Versions
133
+
134
+ Versions are managed automatically via [hatch-vcs](https://github.com/ofek/hatch-vcs), which follows the versioning scheme from [setuptools-scm](https://setuptools-scm.readthedocs.io/en/latest/usage/#default-versioning-scheme).
135
+
136
+ To create a new version, tag the code with `git tag <version>`, e.g. `git tag v0.1.0`, and push the tag with `git push --tags`.
137
+
138
+ You can check the version by running
139
+
140
+ ```bash
141
+ uv run hatch version
142
+ ```
143
+
144
+ In python you can see the version with
145
+ ```python
146
+ from ltc_reader import __version__
147
+
148
+ print(f"ltc_reader version is { __version__ }")
149
+ ```
150
+
151
+ ## Publishing the package
152
+
153
+
154
+ If you're ready to publish your package to [PyPI](https://pypi.org/) (i.e. you want to be able to run `pip install my-package-name` from anywhere), follow the [uv instructions](https://docs.astral.sh/uv/guides/publish/).
155
+ In short, they boil down to running:
156
+
157
+ 1. Build the wheel
158
+
159
+ ```bash
160
+ uv build
161
+ ```
162
+
163
+ 2. Upload the wheel to PyPI
164
+
165
+ ```bash
166
+ uv publish
167
+ ```
168
+
169
+ If your package is private and you are using gitlab.ewi.tudelft.nl, you can publish it to it's private registry.
170
+ This will let you do `pip install ltc-reader`.
171
+ See the instructions [here](https://gitlab.ewi.tudelft.nl/reit/python-package-template/-/blob/main/GITLAB-PYPI.md).
172
+
173
+ ## License
174
+ Distributed under the terms of the [GPL license](LICENSE).
@@ -0,0 +1,164 @@
1
+ # ltc-reader
2
+
3
+ Python ltc reader.
4
+
5
+ [[_TOC_]]
6
+
7
+
8
+ ## A generic basic LTC decoder
9
+
10
+ LTC stands for Linear Timecode and is a signal used in media production to
11
+ time synchronize multiple sources of audio and video involved in same production.
12
+
13
+ LTC is an analog audio signal and because of it can be easily transmitted
14
+ among stations and added as an audio channel with other audio and video.
15
+
16
+
17
+ ## Usage
18
+
19
+ The test code in LTCMapTest shows how to use this:
20
+
21
+ ```
22
+ with wave.open("tests/Audio_2.wav") as wav_file:
23
+ metadata = wav_file.getparams()
24
+ if metadata.nchannels != 1:
25
+ raise ValueError("1-channel data required") # noqa: EM101
26
+ # frames = wav_file.readframes(metadata.nframes)
27
+ data: bytes = wav_file.readframes(metadata.nframes)
28
+ chan: Channel = ByteChannel(data, metadata.framerate, metadata.sampwidth, "little", None)
29
+
30
+ map: LTCMap = LTCMap.fromChannel(chan)
31
+ print(map)
32
+
33
+ ```
34
+
35
+ Most lines are just fetching your audio from a file and extracting the data, sample rate, data width etc. You can change this with other code to read your favourite encoding (eg mp3 , aiff, flac, etc). The decoded data is then put into the Channel object and that is used to create the LTCMap. The Channel ensures the audio is 1-channel with float samples, and ensures there is a ```get``` method to get the Nth sample in the audio.
36
+
37
+ The example uses an ByteChannel, which assumes your data consists of a list of samples
38
+ and each sample is a fixed number of bytes in little or big endian form.
39
+ If your data has a different behaviour, you can implement your own Channel
40
+ to map map/adapt to the required form. Your data doesn't even have to be in memory for that.
41
+
42
+ The LTCMap processes all the Channel samples and finds all the LTCs contained.
43
+ This map can be accessed through the ```getMap``` method.
44
+ This map contains all sample positions (int) and the extracted LTCFrame data.
45
+ The sample position is the first sample of the LTC code in the channel.
46
+
47
+
48
+
49
+ NOTE
50
+ This contains hard copy of tudelft.utilities 1.1.6 from https://gitlab.ewi.tudelft.nl/interactive-intelligence/utilities/utilitiespy
51
+
52
+
53
+ ## Installation
54
+
55
+
56
+ 1. Install [uv](https://docs.astral.sh/uv/):
57
+
58
+ 2. Install the dependencies, including the dev dependencies
59
+
60
+ ```bash
61
+ uv sync
62
+ ```
63
+ or install only the runtime dependencies
64
+
65
+ ```bash
66
+ uv sync --no-dev
67
+ ```
68
+
69
+ 3. Install the prek hook.
70
+ This will set up prek to run the checks automatically on your files before you commit them.
71
+
72
+ ```bash
73
+ uv run prek install
74
+ ```
75
+
76
+ **Remember that if the prek checks fail, you can always commit by skipping the checks with `git commit --no-verify`**
77
+
78
+
79
+ ## Running tests
80
+
81
+ Run your tests with
82
+
83
+ ```bash
84
+ uv run pytest --cov=src ./tests
85
+ ```
86
+
87
+ ## Formatting and checking
88
+
89
+ The tools for formatting and linting your code for errors are all bundled with [prek](https://prek.j178.dev). Included are:
90
+ - [ruff](https://astral.sh/ruff) - linting and formatting
91
+ - [yamlfix](https://github.com/lyz-code/yamlfix) - linting and formatting for .yaml files
92
+ - various other small fixes and checks (see the [`.pre-commit-config.yaml`](.pre-commit-config.yaml) file for more information)
93
+
94
+ It's possible that prek will make changes to your files when it runs the checks, so you should add those changes to your commit before you commit your code. A typical workflow would look like this:
95
+
96
+ ```bash
97
+ git add -u
98
+ git commit -m "My commit message"
99
+ # prek will run the checks here; if it makes changes, you'll need to add them to your commit
100
+ git add -u
101
+ git commit -m "My commit message"
102
+ # changes should have all been made by now and the commit should pass if there are no other issues
103
+ # if your commit fails again here, you have to fix the issues manually (not everything can be fixed automatically).
104
+ ```
105
+
106
+ One thing that is worth knowing is how to lint your files outside of the context of a commit. You can run the checks manually by running the following command:
107
+
108
+ ```bash
109
+ uv run prek run --all-files
110
+ ```
111
+
112
+ This will run the checks on all files in your git project, regardless of whether they're staged for commit or not.
113
+
114
+ ## Documentation
115
+
116
+ Generate the documentation locally with
117
+
118
+ ```bash
119
+ uv run zensical serve
120
+ ```
121
+
122
+ ## Versions
123
+
124
+ Versions are managed automatically via [hatch-vcs](https://github.com/ofek/hatch-vcs), which follows the versioning scheme from [setuptools-scm](https://setuptools-scm.readthedocs.io/en/latest/usage/#default-versioning-scheme).
125
+
126
+ To create a new version, tag the code with `git tag <version>`, e.g. `git tag v0.1.0`, and push the tag with `git push --tags`.
127
+
128
+ You can check the version by running
129
+
130
+ ```bash
131
+ uv run hatch version
132
+ ```
133
+
134
+ In python you can see the version with
135
+ ```python
136
+ from ltc_reader import __version__
137
+
138
+ print(f"ltc_reader version is { __version__ }")
139
+ ```
140
+
141
+ ## Publishing the package
142
+
143
+
144
+ If you're ready to publish your package to [PyPI](https://pypi.org/) (i.e. you want to be able to run `pip install my-package-name` from anywhere), follow the [uv instructions](https://docs.astral.sh/uv/guides/publish/).
145
+ In short, they boil down to running:
146
+
147
+ 1. Build the wheel
148
+
149
+ ```bash
150
+ uv build
151
+ ```
152
+
153
+ 2. Upload the wheel to PyPI
154
+
155
+ ```bash
156
+ uv publish
157
+ ```
158
+
159
+ If your package is private and you are using gitlab.ewi.tudelft.nl, you can publish it to it's private registry.
160
+ This will let you do `pip install ltc-reader`.
161
+ See the instructions [here](https://gitlab.ewi.tudelft.nl/reit/python-package-template/-/blob/main/GITLAB-PYPI.md).
162
+
163
+ ## License
164
+ Distributed under the terms of the [GPL license](LICENSE).
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '1.0.0'
32
- __version_tuple__ = version_tuple = (1, 0, 0)
31
+ __version__ = version = '1.0.2'
32
+ __version_tuple__ = version_tuple = (1, 0, 2)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -2,7 +2,7 @@
2
2
  name = "ltc-reader"
3
3
  dynamic = ["version"]
4
4
  authors = [
5
- { name = "Wouter Pasman", email = "w.pasman@tudelft.nl" },
5
+ { name = "REIT", email = "reit-ewi@tudelft.nl" },
6
6
  ]
7
7
  description = "Python ltc reader."
8
8
  readme = "README.md"
@@ -125,7 +125,7 @@ pydocstyle.convention = "google"
125
125
  "INP001", # Missing __init__.py file
126
126
  "SIM201", # not blabla versus !=
127
127
  ]
128
- "src/tudelft/**.py" = [
128
+ "src/ltc_reader/tudelft/**.py" = [
129
129
  "UP035", # typing.List
130
130
  "UP007", # Optional
131
131
  "SIM101", # Multiple isinstance calls
@@ -3,8 +3,8 @@ from __future__ import annotations
3
3
  from abc import abstractmethod
4
4
  from typing import Literal
5
5
 
6
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
7
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
6
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
7
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
8
8
 
9
9
 
10
10
  class Channel(ImmutableList[float]):
@@ -2,7 +2,7 @@ from __future__ import annotations
2
2
 
3
3
  from typing import List, Optional
4
4
 
5
- from tudelft.utilities.tools.safehash import safehash
5
+ from ltc_reader.tudelft.utilities.tools.safehash import safehash
6
6
 
7
7
 
8
8
  class ExceptionContainer:
@@ -1,6 +1,6 @@
1
1
  from typing import TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
4
4
 
5
5
  E = TypeVar("E")
6
6
 
@@ -1,9 +1,9 @@
1
1
  from _ctypes import ArgumentError
2
2
  from typing import TypeVar
3
3
 
4
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
5
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
6
- from tudelft.utilities.immutablelist.Permutations import Permutations
4
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
5
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
6
+ from ltc_reader.tudelft.utilities.immutablelist.Permutations import Permutations
7
7
 
8
8
  E = TypeVar("E")
9
9
 
@@ -1,7 +1,7 @@
1
1
  from collections.abc import Collection
2
2
  from typing import TypeVar
3
3
 
4
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
5
 
6
6
  E = TypeVar("E")
7
7
 
@@ -1,7 +1,7 @@
1
1
  from typing import Generic, List, TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
5
 
6
6
  E = TypeVar("E")
7
7
 
@@ -2,8 +2,8 @@ from __future__ import annotations
2
2
 
3
3
  from typing import Generic, Set, TypeVar
4
4
 
5
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
6
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
6
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
7
7
 
8
8
  E = TypeVar("E")
9
9
 
@@ -1,7 +1,7 @@
1
1
  from typing import Callable, Generic, TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
5
 
6
6
  IN1 = TypeVar("IN1")
7
7
  OUT = TypeVar("OUT")
@@ -1,7 +1,7 @@
1
1
  from typing import Callable, Generic, TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
5
 
6
6
  OUT = TypeVar("OUT")
7
7
  IN1 = TypeVar("IN1")
@@ -1,8 +1,8 @@
1
1
  from typing import List, TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
- from tudelft.utilities.immutablelist.FixedList import FixedList
5
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.FixedList import FixedList
5
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
6
6
 
7
7
  T = TypeVar("T")
8
8
 
@@ -1,6 +1,6 @@
1
1
  from typing import TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
4
4
 
5
5
  E = TypeVar("E")
6
6
 
@@ -1,9 +1,9 @@
1
1
  from math import comb
2
2
  from typing import List, TypeVar
3
3
 
4
- from tudelft.utilities.immutablelist.AbstractPermutations import AbstractPermutations
5
- from tudelft.utilities.immutablelist.FixedList import FixedList
6
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractPermutations import AbstractPermutations
5
+ from ltc_reader.tudelft.utilities.immutablelist.FixedList import FixedList
6
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
7
7
 
8
8
  E = TypeVar("E")
9
9
 
@@ -1,8 +1,8 @@
1
1
  from typing import List, TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractPermutations import AbstractPermutations
4
- from tudelft.utilities.immutablelist.FixedList import FixedList
5
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractPermutations import AbstractPermutations
4
+ from ltc_reader.tudelft.utilities.immutablelist.FixedList import FixedList
5
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
6
6
 
7
7
  E = TypeVar("E")
8
8
 
@@ -1,10 +1,10 @@
1
1
  from math import factorial
2
2
  from typing import List, Tuple, TypeVar
3
3
 
4
- from tudelft.utilities.immutablelist.AbstractPermutations import AbstractPermutations
5
- from tudelft.utilities.immutablelist.FixedList import FixedList
6
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
7
- from tudelft.utilities.immutablelist.ListWithRemove import ListWithRemove
4
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractPermutations import AbstractPermutations
5
+ from ltc_reader.tudelft.utilities.immutablelist.FixedList import FixedList
6
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
7
+ from ltc_reader.tudelft.utilities.immutablelist.ListWithRemove import ListWithRemove
8
8
 
9
9
  E = TypeVar("E")
10
10
 
@@ -1,8 +1,8 @@
1
1
  from typing import TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
- from tudelft.utilities.immutablelist.SubList import SubList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
+ from ltc_reader.tudelft.utilities.immutablelist.SubList import SubList
6
6
 
7
7
  T = TypeVar("T")
8
8
 
@@ -1,6 +1,6 @@
1
1
  from decimal import ROUND_FLOOR, Decimal
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
4
 
5
5
 
6
6
  class Range(AbstractImmutableList[Decimal]):
@@ -1,7 +1,7 @@
1
1
  from typing import TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
5
 
6
6
  E = TypeVar("E")
7
7
 
@@ -1,7 +1,7 @@
1
1
  from typing import TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
5
 
6
6
 
7
7
  def bitCount(n: int):
@@ -1,8 +1,8 @@
1
1
  from typing import TypeVar
2
2
 
3
- from tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
- from tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
- from tudelft.utilities.immutablelist.Tuple import Tuple
3
+ from ltc_reader.tudelft.utilities.immutablelist.AbstractImmutableList import AbstractImmutableList
4
+ from ltc_reader.tudelft.utilities.immutablelist.ImmutableList import ImmutableList
5
+ from ltc_reader.tudelft.utilities.immutablelist.Tuple import Tuple
6
6
 
7
7
  T1 = TypeVar("T1")
8
8
  T2 = TypeVar("T2")
@@ -2,8 +2,8 @@ import threading
2
2
  import traceback
3
3
  from typing import Generic, List, TypeVar
4
4
 
5
- from tudelft.utilities.listener.Listenable import Listenable
6
- from tudelft.utilities.listener.Listener import Listener
5
+ from ltc_reader.tudelft.utilities.listener.Listenable import Listenable
6
+ from ltc_reader.tudelft.utilities.listener.Listener import Listener
7
7
 
8
8
  TYPE = TypeVar("TYPE")
9
9
 
@@ -1,7 +1,7 @@
1
1
  from abc import ABC, abstractmethod
2
2
  from typing import Generic, TypeVar
3
3
 
4
- from tudelft.utilities.listener.Listener import Listener
4
+ from ltc_reader.tudelft.utilities.listener.Listener import Listener
5
5
 
6
6
  TYPE = TypeVar("TYPE")
7
7
 
@@ -1,7 +1,7 @@
1
1
  from collections.abc import Collection
2
2
  from typing import Any, Generic, List, TypeVar
3
3
 
4
- from tudelft.utilities.tools.comparator import Comparator, DefaultComparator
4
+ from ltc_reader.tudelft.utilities.tools.comparator import Comparator, DefaultComparator
5
5
 
6
6
  E = TypeVar("E")
7
7
 
ltc_reader-1.0.0/PKG-INFO DELETED
@@ -1,55 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ltc-reader
3
- Version: 1.0.0
4
- Summary: Python ltc reader.
5
- Project-URL: Homepage, https://gitlab.ewi.tudelft.nl/capturelab/py-ltc-reader
6
- Author-email: Wouter Pasman <w.pasman@tudelft.nl>
7
- License-File: LICENSE
8
- Requires-Python: >=3.9
9
- Description-Content-Type: text/markdown
10
-
11
- # LTC Reader
12
-
13
- ## A generic basic LTC decoder
14
-
15
- LTC stands for Linear Timecode and is a signal used in media production to
16
- time synchronize multiple sources of audio and video involved in same production.
17
-
18
- LTC is an analog audio signal and because of it can be easily transmitted
19
- among stations and added as an audio channel with other audio and video.
20
-
21
-
22
- ## Usage
23
-
24
- The test code in LTCMapTest shows how to use this:
25
-
26
- ```
27
- with wave.open("tests/Audio_2.wav") as wav_file:
28
- metadata = wav_file.getparams()
29
- if metadata.nchannels != 1:
30
- raise ValueError("1-channel data required") # noqa: EM101
31
- # frames = wav_file.readframes(metadata.nframes)
32
- data: bytes = wav_file.readframes(metadata.nframes)
33
- chan: Channel = ByteChannel(data, metadata.framerate, metadata.sampwidth, "little", None)
34
-
35
- map: LTCMap = LTCMap.fromChannel(chan)
36
- print(map)
37
-
38
- ```
39
-
40
- Most lines are just fetching your audio from a file and extracting the data, sample rate, data width etc. You can change this with other code to read your favourite encoding (eg mp3 , aiff, flac, etc). The decoded data is then put into the Channel object and that is used to create the LTCMap. The Channel ensures the audio is 1-channel with float samples, and ensures there is a ```get``` method to get the Nth sample in the audio.
41
-
42
- The example uses an ByteChannel, which assumes your data consists of a list of samples
43
- and each sample is a fixed number of bytes in little or big endian form.
44
- If your data has a different behaviour, you can implement your own Channel
45
- to map map/adapt to the required form. Your data doesn't even have to be in memory for that.
46
-
47
- The LTCMap processes all the Channel samples and finds all the LTCs contained.
48
- This map can be accessed through the ```getMap``` method.
49
- This map contains all sample positions (int) and the extracted LTCFrame data.
50
- The sample position is the first sample of the LTC code in the channel.
51
-
52
-
53
-
54
- NOTE
55
- This contains hard copy of tudelft.utilities 1.1.6 from https://gitlab.ewi.tudelft.nl/interactive-intelligence/utilities/utilitiespy
@@ -1,45 +0,0 @@
1
- # LTC Reader
2
-
3
- ## A generic basic LTC decoder
4
-
5
- LTC stands for Linear Timecode and is a signal used in media production to
6
- time synchronize multiple sources of audio and video involved in same production.
7
-
8
- LTC is an analog audio signal and because of it can be easily transmitted
9
- among stations and added as an audio channel with other audio and video.
10
-
11
-
12
- ## Usage
13
-
14
- The test code in LTCMapTest shows how to use this:
15
-
16
- ```
17
- with wave.open("tests/Audio_2.wav") as wav_file:
18
- metadata = wav_file.getparams()
19
- if metadata.nchannels != 1:
20
- raise ValueError("1-channel data required") # noqa: EM101
21
- # frames = wav_file.readframes(metadata.nframes)
22
- data: bytes = wav_file.readframes(metadata.nframes)
23
- chan: Channel = ByteChannel(data, metadata.framerate, metadata.sampwidth, "little", None)
24
-
25
- map: LTCMap = LTCMap.fromChannel(chan)
26
- print(map)
27
-
28
- ```
29
-
30
- Most lines are just fetching your audio from a file and extracting the data, sample rate, data width etc. You can change this with other code to read your favourite encoding (eg mp3 , aiff, flac, etc). The decoded data is then put into the Channel object and that is used to create the LTCMap. The Channel ensures the audio is 1-channel with float samples, and ensures there is a ```get``` method to get the Nth sample in the audio.
31
-
32
- The example uses an ByteChannel, which assumes your data consists of a list of samples
33
- and each sample is a fixed number of bytes in little or big endian form.
34
- If your data has a different behaviour, you can implement your own Channel
35
- to map map/adapt to the required form. Your data doesn't even have to be in memory for that.
36
-
37
- The LTCMap processes all the Channel samples and finds all the LTCs contained.
38
- This map can be accessed through the ```getMap``` method.
39
- This map contains all sample positions (int) and the extracted LTCFrame data.
40
- The sample position is the first sample of the LTC code in the channel.
41
-
42
-
43
-
44
- NOTE
45
- This contains hard copy of tudelft.utilities 1.1.6 from https://gitlab.ewi.tudelft.nl/interactive-intelligence/utilities/utilitiespy
File without changes
File without changes